rendered paste bodypublic OnPlayerStateChange(playerid, newstate, oldstate)
{
#if DEBUG_MODE == true
new string[256];
#endif
if(newstate == PLAYER_STATE_ONFOOT) {
TextDrawDestroy(showspeed[playerid]);
}
if(newstate == PLAYER_STATE_DRIVER) {
#if DEBUG_MODE == true
format(string,sizeof(string),"You have entered a vehicle (ID: %i Model: %i)",GetPlayerVehicleID(playerid),GetPlayerVehicleModelID(playerid));
SendClientMessage(playerid,COLOR_YELLOW,string);
#endif
if(IsVehicleCar(GetPlayerVehicleModelID(playerid))) {
SendClientMessage(playerid,COLOR_YELLOW,"Type /lock to lock the car doors");
SendClientMessage(playerid,COLOR_YELLOW,"Type /unlock to unlock the car doors");
return 1;
}
if(IsVehicleBoat(GetPlayerVehicleModelID(playerid))) {
SendClientMessage(playerid,COLOR_YELLOW,"Type /fish to go fishing.");
SendClientMessage(playerid,COLOR_YELLOW,"Type /lock to lock the boat doors");
SendClientMessage(playerid,COLOR_YELLOW,"Type /unlock to unlock the boat doors");
return 1;
}
}
return 1;
}