04.02.2010, 21:21
Heres what i have for /me /o and /b, but i can't seem to get them working.
Код:
if(!strcmp(cmdtext, "/me", true, 4)) { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [ACTION]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 40.0, x, y, z)) { SendClientMessage(i, 0xFFFF00AA, str); } } } return 1; } // GOOC if(!strcmp(cmdtext, "/o", true, 4)) { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /o [MESSEGE]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "[GOOC] %s : %s", str, cmdtext[4]); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 2000.0, x, y, z)) { SendClientMessage(i, 0xFFFF00AA, str); } } } return 1; } // local OOC if(!strcmp(cmdtext, "/b", true, 4)) { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /b [MESSEGE]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "[LOCAL OCC] %s : %s", str, cmdtext[4]); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerInRangeOfPoint(i, 60.0, x, y, z)) { SendClientMessage(i, 0xFFFF00AA, str); } } } return 1; }