17.01.2015, 22:57
(
Последний раз редактировалось Brandon001; 17.01.2015 в 23:40.
)
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
{
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
{