Ovaj callback se poziva kada igrac promeni svoje stanje

Parametri Edit

(playerid, newstate, oldstate)
playerid - ID igraca koji menja stanje
newstate - Igracevo novo stanje
oldstate - Igracevo staro stanje
Return - Ovaj callback ne zahteva return

Primer Edit

public OnPlayerStateChange(playerid, newstate, oldstate)
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Igrac ulazi u vozilu kao vozac
        new vehicleid = GetPlayerVehicleID(playerid);
        AddVehicleComponent(vehicleid, 1010); //Dodaje NOS na vozilo
    return 1;

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.