25.11.2016, 08:48
I would like to know how to insert a command such as /say into a script. Please tell me everything step by step, as do I just copy paste a command into the script or does it have to be in a certain place? Should I use filterscripts for these commands? Do I have to insert something at the beginning of the script? Am I skipping many steps before trying something like /say, and should try some more basic scripting out?
Few commands I found:
Few commands I found:
Code:
CMD:say(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >=3)) return SendClientMessage(playerid, 0xFF0000FF, "You can't use this command.");
if(isnull(params)) return SendClientMessage(playerid, 0xFF0000, "Usage: /say (text)");
new lstr[128];
format(lstr,sizeof(lstr),"Admin:%s", params)
OOCNews(0x3399FFAA,lstr);
return 1;
}
Code:
CMDay(playerid,params[0])
{
if (isnull(params)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE1, "Usage: /say [text]");
return 1;
}
else {
new string[128];
format(string, sizeof(string), "[SERVER]: %i", params[0]);
SendClientMessageToAll(0xFF9900AA, string);
return 1;
}
}


