[HELP] exit vehicle
#1

Hello how can I make for example when in my car fuel is 0 L and I was frozen how can I make when I press enter button then I remove from vehicle and I be unfrozen also when I rent car and I don't want rent a car then I press enter button and I remove from vehicle if you know what I mean? Thanks
Reply
#2

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{			
if(PRESSED(KEY_SUBMISSION))
{
if(GetPlayerState(playerid) == 2)
{
if(Engine[playerid] == 0 || Fuel[playerid] == 0)
{
TogglePlayerControllable(playerid,1);
VehAsk[playerid] = 0;
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}
something like that?
Reply
#3

Quote:
Originally Posted by WardenCS
Посмотреть сообщение
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{			
if(PRESSED(KEY_SUBMISSION))
{
if(GetPlayerState(playerid) == 2)
{
if(Engine[playerid] == 0 || Fuel[playerid] == 0)
{
TogglePlayerControllable(playerid,1);
VehAsk[playerid] = 0;
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}
something like that?
You probs should add a float

pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPosition(playerid, x,y,z+10);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)