21.10.2012, 18:56
Hello everyone
Could someone tell me or give me a new code?
when I type /me [text] it work fine and send message if I type /whisper it say "Usage: /whisper [text],here's my code
I use zcmd
Thanks all!
Could someone tell me or give me a new code?
when I type /me [text] it work fine and send message if I type /whisper it say "Usage: /whisper [text],here's my code
I use zcmd
Код:
CMD:whisper(playerid, params[]) { new pname[MAX_PLAYER_NAME], str[128], Float:pPos[3]; if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, -1, "Usage: /whisper [text]"); GetPlayerName(playerid, pname, sizeof(pname)); GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, 10.0, pPos[0], pPos[1], pPos[2])) { format(str, sizeof(str), "[WHISPER] %s: %s", pname, params); SendClientMessage(i, -1, str); } } return 1; }
Код:
CMD:me(playerid, params[]) { if(isnull(params))return SendClientMessage(playerid, 0xFF0000FF, "Usage: /me [action]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s says: %s", str, params); SendClientMessageToAll(0xFF9900AA, str); return 1; }
Thanks all!