FANDOM


Ova funkcija dobiva ID vozila u kojem je igrač.


Parametri: (playerid)

playerid - ID Igrača od kojeg želimo ID vozila.


Returns: Ova funkcija ne vraća određenu vrijednost.


PrimjerEdit

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/vozilo", true) == 0)
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //Provjeraje da li je igrač u vozilu
        {
            new string[64];
            new voziloid = GetPlayerVehicleID(playerid); //Uzima ID vozila
            format(string,sizeof(string), "ID vaseg vozila je: %d", voziloid); //Ubacuje ID vozila u tekst
            SendClientMessage(playerid, 0xFFFFFFAA, string); //Na chat izlazi ID vozila
        }
        else return SendClientMessage(playerid, 0xFF0000FF, "[!] Niste u vozilu"); //Ukoliko nije u vozilu
    }
    return 0;
}

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.