3 Things (maybe easy)
#4

Well, you need strtok if you use strcmp.

pawn Код:
if(strcmp("/apm", cmdtext, 4) == 0)
{
new tmp, tmp2, idx, string;
tmp = strtok(cmdtext[5], idx);
tmp2 = strtok(cmdtext[7], idx);
if((!strlen(tmp)) || (!strlen(tmp2)))
{
SendClientMessage(playerid, {your color}, "USAGE: /apm [playerid] [message]");
}
else
{
format(string, sizeof(string), "ID %d: Admin says: %s", tmp, tmp2);
SendClientMessage(tmp, {your color}, string);
}
return 1;
}
You need to set some extra checks like if playerid is not filled in etc etc.
But this is a begin on how to make that command
Reply


Messages In This Thread
3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 15:24
Re: 3 Things (maybe easy) - by Hipflop - 09.07.2011, 15:29
Respuesta: Re: 3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 15:36
Re: 3 Things (maybe easy) - by Hipflop - 09.07.2011, 15:44
Respuesta: 3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 15:52
Re: 3 Things (maybe easy) - by Hipflop - 09.07.2011, 15:58
Re: 3 Things (maybe easy) - by FireCat - 09.07.2011, 16:01
Re: 3 Things (maybe easy) - by Kush - 09.07.2011, 16:23
Respuesta: 3 Things (maybe easy) - by Alex_Obando - 09.07.2011, 16:34

Forum Jump:


Users browsing this thread: 3 Guest(s)