25.04.2014, 22:26
Hi ,
I have respected a tuto and i've made this for a Team car script :
I don't know why but if i try to go in vehicle i'm removed for ALL vehicles...
Could you help me plz ?I think the problem come from {}
Guillaume.
I have respected a tuto and i've made this for a Team car script :
Quote:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2) { new CarCheck = GetPlayerVehicleID(playerid); if(CarCheck == Cars[Police1]||CarCheck == Cars[Police2]||CarCheck == Cars[Police3]||CarCheck == Cars[Police4]||CarCheck == Cars[Police5]||CarCheck == Cars[Police6]||CarCheck == Cars[Police7]||CarCheck == Cars[Police8]||CarCheck == Cars[Police9]||CarCheck == Cars[Police0] ) { if(gTeam[playerid] != 2) { SendClientMessage(playerid, COLOR_RED, "You do not have the keys for this car!"); RemovePlayerFromVehicle(playerid); return 1; } } if(CarCheck == Cars[Army1]||CarCheck == Cars[Army2]||CarCheck == Cars[Army3]||CarCheck == Cars[Army4]||Cars[Army5]||CarCheck == Cars[Army6]||CarCheck == Cars[Army7]||CarCheck == Cars[Army8]) { if(gTeam[playerid] != 4) { SendClientMessage(playerid, COLOR_RED, "You do not have the keys for this car!"); RemovePlayerFromVehicle(playerid); return 1; } } if(CarCheck == Cars[Mafia1]||CarCheck == Cars[Mafia2]||CarCheck == Cars[Mafia3]||CarCheck == Cars[Mafia4]||CarCheck == Cars[Mafia5]||CarCheck == Cars[Mafia6]||CarCheck == Cars[Mafia7]||CarCheck == Cars[Mafia8]||CarCheck == Cars[Mafia9]) { if(gTeam[playerid] != 1) { SendClientMessage(playerid, COLOR_RED, "You do not have the keys for this car!"); RemovePlayerFromVehicle(playerid); return 1; } } if(CarCheck == Cars[Gang1]||CarCheck == Cars[Gang2]||CarCheck == Cars[Gang3]||CarCheck == Cars[Gang4]||CarCheck == Cars[Gang5]||CarCheck == Cars[Gang6]||CarCheck == Cars[Gang7]) { if(gTeam[playerid] != 3) { SendClientMessage(playerid, COLOR_RED, "You do not have the keys for this car!"); RemovePlayerFromVehicle(playerid); return 1; } } return 1; } return 1; |
Could you help me plz ?I think the problem come from {}
Guillaume.