command, (sendmessagetoallplayers)
#4

DCMD and SSCANF:
pawn Код:
//OnPlayerCommand
dcmd(o, 1, cmdtext);
//SOmewhere outside callbacks
dcmd_o(playerid, params[])
{
   new playername[MAX_PLAYER_NAME], message[128],string[128];
   if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, -1, "Correct usage: /o [message]");
   GetPlayerName(playerid, playername, sizeof(playername));
   format(string, sizeof(string), "(( [%s]: %s ))", playername, message);
   SendClientMessageToAll(-1, string);
   return 1;
}
Reply


Messages In This Thread
command, (sendmessagetoallplayers) - by davelord - 14.05.2011, 13:21
Re: command, (sendmessagetoallplayers) - by Cjgogo - 14.05.2011, 13:32
Re: command, (sendmessagetoallplayers) - by Famalamalam - 14.05.2011, 13:55
Re: command, (sendmessagetoallplayers) - by Biesmen - 14.05.2011, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)