Problem on Event Kick Command ! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem on Event Kick Command ! (
/showthread.php?tid=467920)
Problem on Event Kick Command ! -
MAFIAWARS - 05.10.2013
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 !
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;
}
Re: Problem on Event Kick Command ! -
TomatoRage - 05.10.2013
pawn Код:
format(str_, 62, "[ ! ] %s has been kicked out from the event !", Targetid);
Try this