Exit Vehicle Problem - 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: Exit Vehicle Problem (
/showthread.php?tid=289927)
Exit Vehicle Problem -
TheNavigator - 13.10.2011
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
TogglePlayerControllable(playerid, 1);
if (GetPlayerState(playerid) == 1)
{
return 1;
}
if(PlayerInfo[playerid][pSeatBelt] == 1)
{
PlayerInfo[playerid][pSeatBelt] = 0;
new stringtosee[255];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new ftext[255];
if(PlayerInfo[playerid][pSex] == 1)
{
ftext = "his";
}
else if(PlayerInfo[playerid][pSex] == 1)
{
ftext = "her";
}
format(stringtosee, sizeof(stringtosee), "* %s unbuckles %s seat belt", sendername , ftext);
ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
return 1;
}
/*if(gGas[playerid] == 1)
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Left car", 500, 3);
}*/
return 1;
}
Here's the code
The problem is that the player doesn't exit if the car's engine isn't started by /start :/
How can I fix that?
Re: Exit Vehicle Problem -
TheNavigator - 16.10.2011
Anyone?
Re: Exit Vehicle Problem -
TheNavigator - 18.10.2011
Any help?
Re: Exit Vehicle Problem -
manchestera - 18.10.2011
is the player frozen inside if so you need to put in the code to unfreeze them.
Re: Exit Vehicle Problem -
TheNavigator - 18.10.2011
What was the function for entering the car? o.o
Re: Exit Vehicle Problem -
TheNavigator - 23.10.2011
I can't find it
Re: Exit Vehicle Problem -
TheNavigator - 26.10.2011
Can someone help me please?
Re: Exit Vehicle Problem -
TheNavigator - 28.10.2011
Anyone?
Re: Exit Vehicle Problem -
FUNExtreme - 28.10.2011
Show us OnPlayerEnterVehicle please
Re: Exit Vehicle Problem -
TheNavigator - 29.10.2011
Can't find it o.o
Found a dashed one though
By the way, I'm using LSLRP script
Код:
/*public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] >= 3)
{
if (IsACopCar(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3) {}
else { SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); }
}
if (IsALSFMD(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
else { SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
}
}
return 1;
}*/