15.12.2011, 07:23
Solved! Thanks alot xFlawLess
pawn Код:
I want the function to check if the Vehicle Model is 469 then check is player's state is Driver? and is the player member of TEAM_IN Or Team_US. Then Remove him from the vehicle with the SendClientMessage! Can somebody please tell me whats wrong? can you correct me the code and where to use it? PS Will rep everyone who will help! |
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 469 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 447 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 563)
{
if(gTeam[playerid] == TEAM_IN || gTeam[playerid] == TEAM_EUS )
{
SendClientMessage(playerid, 0xFF0000AA, "You're not allowed to drive this vehicle!");
RemovePlayerFromVehicle(playerid);
}
}
}
if(GetVehicleModel(vehicleid) == 469 || GetVehicleModel(vehicleid) == 447 || GetVehicleModel(vehicleid) == 563)
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
if(gTeam[playerid] == TEAM_IN || gTeam[playerid] == TEAM_EUS )
{
SendClientMessage(playerid, 0xFF0000AA, "You're not allowed to drive this vehicle!");
RemovePlayerFromVehicle(playerid);
}
}
}
Use it at OnPlayerStateChange()
pawn Код:
|