26.07.2012, 17:14
Also.
That might help?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new string[128];
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
new vehicle = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && (pveh != 509 && pveh != 481 && pveh != 510) && IsPlayerInAnyVehicle(playerid))
{
SetTimerEx("Startup", 1, false, "ii", playerid, vehicle);
SetTimerEx("engine2", 2500, false, "i", playerid);
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh != 509 && pveh != 481 && pveh != 510) && IsPlayerInAnyVehicle(playerid))
{
SetTimerEx("Startup", 1, false, "ii", playerid, vehicle);
SetTimerEx("engine2", 2500, false, "i", playerid);
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerWeapon(playerid) == 29)
{
SetPlayerArmedWeapon(playerid, 0);
}
}