Jump to content
GIGN Forum

[mans Pirmais Plugins]swear_ban


Recommended Posts

#include <amxmodx>

#include <amxmisc>

// max number of words in swear list and max number of lines in replace list

#define MAX_WORDS 150

#define MAX_REPLACE 50

// global variables for storing the swear list and replace list and their respective number of lines

new g_swearWords[MAX_WORDS][20]

new g_swearNum

new ban_time

public plugin_init()

{

register_plugin ( "Swear Replacement", "1.5", "cookie and sh!ne")

register_clcmd ( "say", "swearcheck" )

register_clcmd ( "say_team", "swearcheck" )

register_concmd ( "amx_addswear", "add_swear", ADMIN_LEVEL_A , "< swear word to add >" )

ban_time = register_cvar( "amx_swear_bantime", "120" )

readList()

}

readList()

{

new Configsdir[64]

new swear_file[64]

get_configsdir( Configsdir, 63 )

format(swear_file, 63, "%s/swearwords.ini", Configsdir )

if ( !file_exists(swear_file) )

{

server_print ( "==========================================================" )

server_print ( "[swear] %s file not found", swear_file )

server_print ( "==========================================================" )

return

}

new len, i=0

while( i < MAX_WORDS && read_file( swear_file, i , g_swearWords[g_swearNum], 19, len ) )

{

i++

if( g_swearWords[g_swearNum][0] == ';' || len == 0 )

continue

g_swearNum++

}

}

public client_connect(id)

{

new new_name[32]

get_user_name ( id, new_name, 31 )

new i = 0

while ( i < g_swearNum )

{

if ( containi ( new_name, g_swearWords[i++] ) != -1 )

{

client_cmd ( id, "name ^"No Swear^"" )

return PLUGIN_CONTINUE

}

}

return PLUGIN_CONTINUE

}

public swearcheck(id)

{

if ( (get_user_flags(id)&ADMIN_LEVEL_A) || !id )

return PLUGIN_CONTINUE

new said[192]

read_args ( said, 191 )

new i = 0

while ( i < g_swearNum )

{

if ( containi ( said, g_swearWords[i++] ) != -1 )

{

new j, playercount, players[32], user_name[32]

get_user_name ( id, user_name, 31 )

get_players ( players, playercount, "c" )

for ( j = 0 ; j < playercount ; j++)

{

if ( get_user_flags(players[j])&ADMIN_LEVEL_A )

client_print( Speletajs [j], print_chat, "%s tika nobanots par vardu %s",user_name, said )

}

server_cmd("amx_banip #%d %d ^"Lamuvards^"",get_user_userid(id) , get_pcvar_num(ban_time))

return PLUGIN_HANDLED

}

}

return PLUGIN_CONTINUE

}

public add_swear(id)

{

if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )

{

client_print ( id, print_console, "[swear Replacement] Access Denied" )

return PLUGIN_HANDLED

}

if ( read_argc() == 1 )

{

client_print ( id, print_console, "[swear Replacement] Arguments not provided" )

return PLUGIN_HANDLED

}

new Configsdir[64]

new swear_file[64]

get_configsdir( Configsdir, 63 )

format ( swear_file, 63, "%s/swearwords.ini", Configsdir )

read_args ( g_swearWords[g_swearNum], 19 )

write_file( swear_file, "" )

write_file( swear_file, g_swearWords[g_swearNum] )

g_swearNum++

id ? client_print ( id, print_console, "[swear Replacement] Swear word added to List" ) : server_print ( "[swear Replacement] Swear word added to file" )

return PLUGIN_HANDLED

}

------------------------------------------

Description : Šis plugins aizliedz cilvēkam lamāties , lidzko tiek lietots lamuvārds seko uzreiz bans.

Author : cookie`

done by : Sh!nE*

Tātad šo pluginu izveidoju tāpec lai cilv eki iemācās nestresot un spelēt bez rupjībām.

Download : Plugin Plugina_sma

Edited by cookie`
Link to comment
Share on other sites

ja jau tas ir juusu plugins kapec tad taa?

register_plugin ( "Swear Replacement", "1.5", "kaboomkazoom")

nevis taa

register_plugin ( "Swear Replacement", "1.5", "cookie")

vai taa

register_plugin ( "Swear Replacement", "1.5", "cookie and sh!ne")

Link to comment
Share on other sites

register_plugin ( "Swear Replacement", "1.5", "kaboomkazoom")

nevis taa

register_plugin ( "Swear Replacement", "1.5", "cookie")

vai taa

register_plugin ( "Swear Replacement", "1.5", "cookie and sh!ne")

jo ņemts no swear sma nesaprotami?

Link to comment
Share on other sites

ja jau juus tadi skripeteri tad vaidzej saprast ko tas nozime

register_plugin ( "Swear Replacement", "1.5", "kaboomkazoom")

register_plugin - Plugina info kad raksta amx_plugins

Swear Raplacement - Plugina Nosaukums

1.5 - Plugina Versija

kaboomkazoom - kas veidoja pluginu

Link to comment
Share on other sites

register_plugin ( "Swear Replacement", "1.5", "kaboomkazoom")

register_plugin - Plugina info kad raksta amx_plugins

Swear Raplacement - Plugina Nosaukums

1.5 - Plugina Versija

kaboomkazoom - kas veidoja pluginu

Tu lox kaboomkazoom neviedoja pluginu , tu lox mēs partaisijām viņa svear pluginu piem ka saka lox parāda !$#

bet šeit par mat ir bans , tu losi izlasi līdz galam 14 gadigais lunis.

Link to comment
Share on other sites

da labi losiiti es pa cs rubiju daudz vairak neka tu taka nebrauc auguma to es saprotu ka jus parveidojat pluginu taka jus parveidojat jus varejat ierakstiit savu niku tur jo to pluginu nav veidojis kaboomkazoom taka nestreso :thumbsup:

Link to comment
Share on other sites

to var nokartot diezgan labi veciishi ir dazi no developer Team 2 dzekini man paliidzeja no vinjiem pie MegaSound Plugina :) Un Pie autor bij jaraksta vinju abi niku un arii mans :)

Link to comment
Share on other sites

Tas ka ir 21. gs nenozīmē ka visi likumi ir atcelti.. Autortiesību pārkāpums (Arī Internetā) ir Krimināli sodāms ar Nepatīkamu naudassodu un pat Cietumsodu Tapēc palasi Satversmi un priecājies....

Link to comment
Share on other sites

:fsckinsad:

Jā jā beidziet te apdirst šie pacani vismaz pacentušies , jo manuprāt , kad es ieskatos kādā smā failā da njexujā nav sajēgas, apmērām tā kad es piermo reizi ieraudziju php!

Neiznu kā tur tie divi , bet zinu to4 ka shine ir labs skripteris un daudz ko man ir uzkrpēlejis!

tāpēc nav ko apskaust pacanus!

Link to comment
Share on other sites

Neiznu kā tur tie divi , bet zinu to4 ka shine ir labs skripteris un daudz ko man ir uzkrpēlejis!

tāpēc nav ko apskaust pacanus!

paldies esctm vismaz viens sajēdz ko mēs esam izveidojuši nevis braucam tika visulaiku iekšā off topikā

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...