SA-MP Forums Archive
help with eject... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with eject... (/showthread.php?tid=185096)



help with eject... - Rafa - 23.10.2010

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


Re: help with eject... - MBX97 - 23.10.2010

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


Re: help with eject... - Rafa - 23.10.2010

can u help me pls ?


Re: help with eject... - MBX97 - 23.10.2010

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


Re: help with eject... - iJumbo - 23.10.2010

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;
}