AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Script help (https://forums.alliedmods.net/showthread.php?t=1398)

xeroblood 04-27-2004 09:30

This compiled fine..

I simply adjusted sid[0] = id...

Code:
#include <amxmodx> #include <amxmisc> new phrase[1][] = { "doh" } new phrasetwo[1][] = { "fu" } new phrasethree[1][] = { "ahh" } new phrasefour[8][] = { "bs", "bullshit", "hacker", "hack", "hax", "speedhack", "wallhack", "aimbot"} new phrasefive[8][] = { "noobed", "newbie", "suxor", "owned", "newb", "whore", "awp", "gay"} new phrasesix[8][] = { "gay", "fag", "homo", "ghey", "queer", "noob", "loser", "bitch"} public plugin_init() {     register_plugin("Say Event","1.0","NicK")     register_clcmd("say","say_event") } public plugin_precache() {     precache_sound("misc/doh4.wav")     precache_sound("misc/fucku.wav")     precache_sound("misc/ahh.wav") } public say_event(id) {     new sid[2]     sid[0] = id     new said[192]     read_args(said,191)     new i     for( i = 0; i < 1; i++ )     {         if(containi(said,phrase[i]) != -1)         {             set_hudmessage(225, 25, 25, -1.0, 0.32, 0, 2.0, 9.0, 0.8, 0.8, 2)             show_hudmessage( 0, "DOH!!!" )             set_task( 1.0, "client", 0, sid, 1 )             break         }         else if( containi(said,phrasetwo[i]) != -1)         {             set_hudmessage(225, 25, 25, -1.0, 0.32, 0, 2.0, 9.0, 0.8, 0.8, 2)             show_hudmessage(0,"You son of a bitch!!!")             set_task(1.0,"client2",0,sid,1)             break         }         else if(containi(said,phrasethree[i]) != -1)         {             set_task(1.0,"client3",0,sid,1)             break         }         else if(containi(said,phrasefour[i]) != -1)         {             set_task(1.0,"client4",0,sid,1)             break         }         else if(containi(said,phrasefive[i]) != -1)         {             set_task(1.0,"client5",0,sid,1)             break         }         else if(containi(said,phrasesix[i]) != -1)         {             set_task(1.0,"client6",0,sid,1)             break         }     }     return PLUGIN_HANDLED } public client(sid[]) {     client_cmd(0,"spk misc/doh4") } public client2(sid[]) {     client_cmd(0,"spk misc/fucku") } public client3(sid[]) {     client_cmd(0,"spk misc/ahh") } public client4(sid[]) {     engclient_cmd(sid[0],"say", "But Im just balming my noobness on you") } public client5(sid[]) {     engclient_cmd(sid[0],"say", "I really am just a noob though") } public client6(sid[]) {     engclient_cmd(sid[0],"say", "Admin I disrespect everyone on this server, including you!!!") }

Nick 04-27-2004 18:49

I compiled with no error's and still only the wavs worked but not replace text...:(

donzeze 04-28-2004 05:59

Try changing the "say" command by "amx_say" becouse with the first one you're chating as any other player.

DonZeZe

Nick 04-28-2004 16:41

Alright haven't thought of that :) ty

donzeze 04-29-2004 00:57

you canl also use :
Code:
// amx_tsay <color> <message> //for left low side messages amx_tsay red Hello //or // amx_csay <color> <message> // for center hud messages amx_csay blue Bye

Tell me if it works

Nick 04-29-2004 02:36

Alright ty

MerK 04-29-2004 05:00

Wow didnt realise how similar the code is to php? or pretty similar

w000t i gonna try make a plugin now :0

FlyingMongoose 04-29-2004 09:00

PHP, Small, and quite a few other languages are very close to C and C++ programming, though are not the same. Making them look alike


All times are GMT -4. The time now is 15:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.