05.10.2013, 16:39
I am Getting the Problem in my /ekick Command to Kick the Players from the Virtual World to Real World.
But the Problem is in Client Messages. When I am kicking someone, so it is giving me ClientMessage To All players that MAFIA_WARS has been kicked out from the Event. But I didn't kick myself, I kicked someone else.
Help Please !
But the Problem is in Client Messages. When I am kicking someone, so it is giving me ClientMessage To All players that MAFIA_WARS has been kicked out from the Event. But I didn't kick myself, I kicked someone else.
Help Please !
pawn Код:
CMD:ekick(playerid, params[])
{
if(pInfo[playerid][pWSELevel]> 1 ) return 0;
if(GetPlayerVirtualWorld(playerid) != 1) return SendClientMessage( playerid, COLOR_RED, "[ ! ] You can't use Event Commands in Real World !");
new targetid, PlayerName[MAX_PLAYER_NAME], str_[100];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "[ ! ] USAGE: /ekick <playerid>");
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(GetPlayerVirtualWorld(targetid) != 1) return SendClientMessage( playerid, COLOR_RED, "[ ! ] This Player is not in Event !" );
SetPlayerVirtualWorld(targetid, 0);
format(str_, 62, "[ ! ] %s has been kicked out from the event !", PlayerName);
SendClientMessageToAll(COLOR_EVENT, str_);
SendClientMessage(targetid, COLOR_EVENT, "[ ! ] You have been kicked out from the Event !");
return 1;
}