need help with car wanted level
#1

Hello Guys i Want to give each car on my server a number/ID and want that if a player enters car on some of the ids he get's wanted only some cars not all and also that if the player had recently entered the car them if he again enter the wanted car he will not get wanted.how i can go that
Reply
#2

Vehicles on your server already have an ID, to get this ID you need to use CreateVehicle. Use this instead of AddStaticVehicle(Ex).
Код:
//Top of your script
new WantedCar = INVALID_VEHICLE_ID;
//Where you create your vehicle (could be OnGameModeInit)
WantedCar = CreateVehicle(...);
//OnPlayerStateChange
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_ONFOOT) {
    if(GetPlayerVehicleID(playerid) == WantedCar) {
        SetPlayerWantedLevel(...);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)