Does anyone know the problem with this ? - 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: Does anyone know the problem with this ? (
/showthread.php?tid=264092)
Does anyone know the problem with this ? -
Jay. - 24.06.2011
Hey , so I have made this.
pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid, ispassenger)
{ if(GetVehicleModel(vehicleid) == 449)
{
AntiFalloff[playerid] = false;
SendClientMessage(playerid,COLOR_YELLOW,"Anti fall of bike was disabled to avoid the tram exciting bug.");
SendClientMessage(playerid,COLOR_YELLOW,"Use /afon to re-enable it.");
SendClientMessage(playerid,COLOR_RED,"NOTE: It is recommended to only turn it on again after you have excited the tram.");
SetCameraBehindPlayer(playerid);
}
return 1;
}
It isn't doing anything....
If you want more code like the antifalofbike just ask.
Thanks
Re: Does anyone know the problem with this ? -
dowster - 24.06.2011
i think you may need parenthesis so instead of:
Код:
AntiFalloff[playerid] = false;
it will be
Код:
AntiFalloff(playerid) = false;
Re: Does anyone know the problem with this ? -
iPLEOMAX - 24.06.2011
I don't know what doesn't work.. Is it the Anti Fall or the whole thing?
Well, try this: (Yeah, i used state change here.)
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 449)
{
AntiFalloff[playerid] = false;
SendClientMessage(playerid,COLOR_YELLOW,"Anti fall of bike was disabled to avoid the tram exciting bug.");
SendClientMessage(playerid,COLOR_YELLOW,"Use /afon to re-enable it.");
SendClientMessage(playerid,COLOR_RED,"NOTE: It is recommended to only turn it on again after you have excited the tram.");
SetCameraBehindPlayer(playerid);
}
return 1;
}
And you can re-enable it automatically by on foot state > antifall true
Re: Does anyone know the problem with this ? -
Jay. - 24.06.2011
Quote:
Originally Posted by dowster
i think you may need parenthesis so instead of:
Код:
AntiFalloff[playerid] = false;
it will be
Код:
AntiFalloff(playerid) = false;
|
Thats giving me a whole load of errors.
Thanks anyway
Quote:
Originally Posted by iPLEOMAX
I don't know what doesn't work.. Is it the Anti Fall or the whole thing?
Well, try this: (Yeah, i used state change here.)
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 449) { AntiFalloff[playerid] = false; SendClientMessage(playerid,COLOR_YELLOW,"Anti fall of bike was disabled to avoid the tram exciting bug."); SendClientMessage(playerid,COLOR_YELLOW,"Use /afon to re-enable it."); SendClientMessage(playerid,COLOR_RED,"NOTE: It is recommended to only turn it on again after you have excited the tram."); SetCameraBehindPlayer(playerid); } return 1; }
And you can re-enable it automatically by on foot state > antifall true
|
Yup , thats working. Thanks alot