05.04.2014, 13:40
Hello guys, today i saw one little problem with my /slap command.. here it is:
I guess here is a problem :
Because i get msg like : You've been slapped by Admin umza.ini! And my nick is Djumza...
Here is a picture :
Any ideas how to fix this ?
pawn Код:
CMD:slap(playerid,params[])
{
new id,msg[128],Float:x,Float:y,Float:z,name[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid,COLOR_RED,"[SERVER]:You must be and Admin to use this command!");
else if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[SERVER]:Player is not connected anymore!");
else if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"[SERVER]:Usage:/slap [name/id]");
else
{
GetPlayerPos(id,x,y,z);
SetPlayerPos(id,x,y,z+4);
format(msg,sizeof(msg),"[SERVER]:You've been slapped by Admin %s!",GetPlayerName(playerid,name,sizeof(name)));
SendClientMessage(id,COLOR_RED,msg);
}
return 1;
}
pawn Код:
format(msg,sizeof(msg),"[SERVER]:You've been slapped by Admin %s!",GetPlayerName(playerid,name,sizeof(name)));
SendClientMessage(id,COLOR_RED,msg);
Here is a picture :
Any ideas how to fix this ?