Little help (AVS) - 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: Little help (AVS) (
/showthread.php?tid=558570)
Help -
Brandon001 - 17.01.2015
Hello everyone! It would be necessary to solve this function so ,that rcon admint get rid of out of the car!
Thank you.
Function detail:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(IsPlayerInAnyVehicle(playerid) && !IsBicycle(GetPlayerVehicleID(playerid)))
{
//TextDrawShowForPlayer(playerid, SpeedoBox);
TextDrawShowForPlayer(playerid, SpeedoText[playerid]);
new vehicleid = GetPlayerVehicleID(playerid);
if(VehicleSecurity[vehicleid] == 1)
{
ToggleAlarm(vehicleid, VEHICLE_PARAMS_ON);
SetTimerEx("StopAlarm", ALARM_TIME, false, "d", vehicleid);
}
new id = GetVehicleID(vehicleid);
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleAccess(playerid, id) < 1)
{
RemovePlayerFromVehicle(playerid);
}
}
else
{