07.08.2014, 07:29
hey guys, i ran into a little problem when making my whisper command
i get error 017 : undefined symbol "params" when compiling
i have sscanf2 included and also foreach,
here is my code
i get error 017 : undefined symbol "params" when compiling
i have sscanf2 included and also foreach,
here is my code
Код:
if(!strcmp(cmdtext,"/whisper",true)) { new str[128], msg[128], Float:Pos[3]; if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_ERROR, "Syntax: /w(hisper) (text)"); GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); format(str, sizeof(str), "Whisper: %s(%d): {FFFFFF}%s", GetName(playerid), playerid, msg); SendClientMessage(playerid, COLOR_LIME, str); foreach(Player, i) { if(IsPlayerInRangeOfPoint(i, 20.0, Pos[0], Pos[1], Pos[2]) && i != playerid) { format(str, sizeof(str), "Whisper: %s(%d): {FFFFFF}%s", GetName(playerid), playerid, msg); SendClientMessage(i, COLOR_LIME, str); return 1; } else if(!IsPlayerInRangeOfPoint(i, 20.0, Pos[0], Pos[1], Pos[2]) && i != playerid) { SendClientMessage(playerid, COLOR_ERROR, "Whispering to Yourself is Weird!"); return 1; } } return 1; }