06.04.2009, 13:23
Well, thanks for your help at first. But how would I then "include" into this command?
Edit: That command works, but when you enter as a passenger, you can still repair the vehicle, so I guess that PLAYER_STATE_DRIVER is either not available or wrong.
Edit2: It appears that you can't use GetPlayerState(playerid) != PLAYER_STATE_DRIVER, you'll have to make it "vice versa".
pawn Code:
if (strcmp("/fix", cmdtext, true)==0)
{
if((!IsPlayerInAnyVehicle(playerid)) && (GetPlayerState(playerid) != PLAYER_STATE_DRIVER))
{
SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle or you're not the driver of it!");
} else {
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
return 1;
}
Edit2: It appears that you can't use GetPlayerState(playerid) != PLAYER_STATE_DRIVER, you'll have to make it "vice versa".