10.09.2017, 11:34
You edited with more details, OK.
Your codes really messy and could be shortened. You're using one too many variables to check if a player is in a vehicle.
You could do:
Doing this is bad:
Your codes really messy and could be shortened. You're using one too many variables to check if a player is in a vehicle.
You could do:
PHP код:
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
{
SetPlayerPos(playerid, x, y, z);
}
else
{
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
}
Код:
if(incar == true && cseat == 0) { SetVehiclePos(veh, -1631.3282,683.6899,6.9591); PutPlayerInVehicle(playerid, veh, 0); } else if(cseat == 1 || cseat == 2 || cseat == 3) return SCM(playerid, COLOR_LIGHTRED, "Error: You are not the driver of this vehicle!");