[HELP] Gate on the moto - 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: [HELP] Gate on the moto (
/showthread.php?tid=352951)
[HELP] Gate on the moto -
V4at - 21.06.2012
If you're on the bike gate does not open, if you are in car gate opens.
Код:
if(IsPlayerInAnyVehicle(playerid) && newkeys & KEY_HANDBRAKE || !IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SPRINT) // Space klavisas
{
Where is problem?
Re: [HELP] Gate on the moto -
judothijs - 21.06.2012
This should work.
pawn Код:
if(IsPlayerInAnyVehicle(playerid) && newkeys & KEY_HANDBRAKE)
{
// gate script
}
if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SPRINT)
{
// gate script
}
if(IsPlayerInAnyBike(playerid, vehicleID) && newkeys & KEY_HANDBRAKE)
{
// gate script
}
stock IsPlayerInAnyBike(playerid, vehicleID)
{
vid = GetPlayerVehicleID(playerid);
if(vid == 509) || (vid == 481) || (vid == 510)
{
return 1;
}
else
{
return 0;
}
}
Re : [HELP] Gate on the moto -
V4at - 21.06.2012
Does not work, shows the error :/