SA-MP Forums Archive
RC car - 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: RC car (/showthread.php?tid=603675)



RC car - bugmenotlol - 26.03.2016

how to make a simple command to exit from a rc car ?


Re: RC car - Mencent - 26.03.2016

Hi!

You can do it like this:
PHP код:
if(!strcmp(cmdtext,"/exitfromrccar",true))
{
    
RemovePlayerFromVehicle(playerid);
    return 
1;

It's a very easy version but you can edit this. Put this code into the public OnPlayerCommandText.


Re: RC car - bugmenotlol - 27.03.2016

not working :P


Re: RC car - K0P - 27.03.2016

You can just exit from rc cars by pressing "VEHICLE ENTER/EXIT" key.
If you want he vehicle to be destroyed on exit then check if the exited vehicle is an RC vehicle,if true/1 then destroy


Re: RC car - bugmenotlol - 27.03.2016

Quote:
Originally Posted by K0P
Посмотреть сообщение
You can just exit from rc cars by pressing "VEHICLE ENTER/EXIT" key.
If you want he vehicle to be destroyed on exit then check if the exited vehicle is an RC vehicle,if true/1 then destroy
not working with me when i typed enter/exit key


Re: RC car - Mencent - 27.03.2016

What exactly do you want? I don't know what you want to do.


Re: RC car - Joron - 27.03.2016

PHP код:
CMD:exit(playerid,params[])
{
if(!
IsPlayerInVehicle(playerid,411)) return  SendClientMessage(playerid,COLOR_RED,"You Need To Be In A RC Car To Use This Command.");//Change 411 to your rc car id
new Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
SetPlayerPos(playeridxy2.5);
return 
1;