help with eject...
#1

guys iwa nt to make /eject [id] command and i make something liek this :P

pawn Код:
if(strcmp(cmdtext, "/eject", true) == 0)
    {
        RemovePlayerFromVehicle(playerid);
        return 1;
    }
and when ill type that eject me from vehicle

pls help xD
Reply
#2

cuz u said to the pawno /eject = RemovPlayerFromVehicle(playerid); , thats means when u type eject it ejects you not any id else the id isn't with this way
Reply
#3

can u help me pls ?
Reply
#4

idk but i didn't make that typ of commands in the pawno many weeks ago
so idk about it , sorry
Reply
#5

use dcmd
under onplayercommandtext
pawn Код:
dcmd(eject,5,cmdtext);
where u want
pawn Код:
dcmd_eject(playerid, params[])
{
    new id, tmp[128];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, RED, "USAGE: /EJECT [ID / NAME]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, RED, "This player is offline");
    if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid,RED,"This player is not in a vehicle!");
    if(id!=playerid) return format(tmp, sizeof tmp, "%s Have Ejected %s From his vehicle",Name(playerid),Name(id)),SendClientMessageToAll(color, tmp),RemovePlayerFromVehicle(id);
    else if(id==playerid) return SendClientMessage(playerid,YELLOW,"You have removed yourself from your vehicle"),RemovePlayerFromVehicle(id);
    return 1;
}
and this where u want
pawn Код:
stock Name(playerid)
{
    new pname[24];
    GetPlayerName(playerid, pname, 24);
    return pname;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)