16.11.2012, 18:56
hey everyone,
i am trying to make something like BTTF, but now when i enter the Delorean car, it doesnt checks if it is, it doesnt even sends the messages..
wuts wrong with this?
i am trying to make something like BTTF, but now when i enter the Delorean car, it doesnt checks if it is, it doesnt even sends the messages..
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER && GetVehicleModel(GetPlayerVehicleID(playerid)) == Delorean) return RemovePlayerFromVehicle(playerid), SendClientMessage(playerid, COLOR_RED, "only the driver may use this vehicle, no passengers allowed");
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == Delorean)
{
if(PlayerInfo[playerid][HasPlutonium] == 2)
{
SendClientMessage(playerid, COLOR_WHITE, "as soon as this Delorean hits 88 mph/140 kmh it will send you to the past");
}
else if(PlayerInfo[playerid][HasPlutonium] == 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "you cannot use this vehicle without Plutonium");
}
}
}
if(oldstate == PLAYER_STATE_DRIVER)
{
//
}
return 1;
}