28.09.2013, 11:47
Hello !
I made a Command /ekick to Kick the Player from Event. I want these things...
1. ClientMessage should be shown to All Players that %s Player has been kicked out from the Event.
2. ClientMessage should be shown to that Player who has kicked "You have been kicked out from Event".
3. ClientMessage should also be shown to that Player who kicked victim, "You have kicked %s Player from The Event"
Problems:
But, I am facing Problems that is that, When I am setting in my script to that [%s] to show the Player name and When I am using /ekick Command in my Server, The Server is Crashing...
2. ClientMessagesToAll is showing also to those Players Who are not in Virtual Event.
3. And When I am kicking someplayer from Event so It is sending me Client Message too like that: "You have been kicked out from the event.
That is my /ekick Command:
Help me in Solving Please?
I made a Command /ekick to Kick the Player from Event. I want these things...
1. ClientMessage should be shown to All Players that %s Player has been kicked out from the Event.
2. ClientMessage should be shown to that Player who has kicked "You have been kicked out from Event".
3. ClientMessage should also be shown to that Player who kicked victim, "You have kicked %s Player from The Event"
Problems:
But, I am facing Problems that is that, When I am setting in my script to that [%s] to show the Player name and When I am using /ekick Command in my Server, The Server is Crashing...
2. ClientMessagesToAll is showing also to those Players Who are not in Virtual Event.
3. And When I am kicking someplayer from Event so It is sending me Client Message too like that: "You have been kicked out from the event.
That is my /ekick Command:
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 !" );
if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, COLOR_LIGHTGREEN, "[ ! ] USAGE: /ekick <playerid>");
new id, giveplayerid;
new PlayerName[24], str_[100];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if( GetPlayerVirtualWorld( playerid ) != 1 ) return SendClientMessage( playerid, COLOR_RED, "[ ! ] This Player is not in Event !" );
SetPlayerVirtualWorld(id, 0);
format(str_, 62, "[ ! ] %s has been kicked out from the event !", PlayerName);
SendClientMessage(giveplayerid, COLOR_PURPLE, "[ ! ] You have kicked %s from Event !, PlayerName");
SendClientMessage(giveplayerid, COLOR_PURPLE, "[ ! ] You have been kicked out from the Event !");
SendClientMessageToAll(COLOR_PURPLE, str_);
return 1;
}