/eject works only with id 0
#1

Ok so,i coded this little /eject command,but it works only if i want eject id 0.

pawn Код:
CMD:ej(playerid,params[])
{
    if(!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /ej [Player/ID]");
    new string[128];
    new string2[128];
    new DestName[24];
    new Destinationid;
    new name[24];
    GetPlayerName(playerid, name, 24);
    GetPlayerName(Destinationid, DestName, 24);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInVehicle(Destinationid, GetPlayerVehicleID(playerid)))
    {
    if(IsPlayerConnected(Destinationid) && playerid != Destinationid)
    {
    format(string2, 128, "You have ejected %s (%i) from your vehicle.", DestName, Destinationid);
    SendClientMessage(playerid, orange, string2);
    GameTextForPlayer(playerid,"~r~Player ejected from vehicle!",3000,5);

    format(string, 128, "You got ejected from %s's (%d) vehicle.", name, playerid);
    SendClientMessage(playerid, orange, string);
    RemovePlayerFromVehicle(Destinationid);
    GameTextForPlayer(Destinationid,"~r~You have been ejected!",3000,5);
    }
    }
    return true;
}
What's wrong?
Reply


Messages In This Thread
/eject works only with id 0 - by Face9000 - 01.06.2012, 12:11
Re: /eject works only with id 0 - by ReneG - 01.06.2012, 12:27
Re: /eject works only with id 0 - by Face9000 - 01.06.2012, 12:29
Re: /eject works only with id 0 - by MadeMan - 01.06.2012, 12:31
Re: /eject works only with id 0 - by Face9000 - 01.06.2012, 12:32
Re: /eject works only with id 0 - by JaKe Elite - 01.06.2012, 12:47
Re: /eject works only with id 0 - by Sandiel - 01.06.2012, 13:27
Re: /eject works only with id 0 - by Adrian9696 - 01.06.2012, 13:43
Re: /eject works only with id 0 - by JaKe Elite - 01.06.2012, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)