Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vozilo = GetPlayerVehicleID(playerid);
- new vIDs = GetPlayerVehicleID(playerid), vrsta[20];
- if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
- {
- new string[128];
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[0][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[0][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[1][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[1][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[2][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[2][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[3][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[3][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[4][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[4][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[5][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[5][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[6][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[6][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[7][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[7][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[8][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[8][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[9][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[9][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[10][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[10][playerid]);
- if(oldstate-1 && newstate) PlayerTextDrawHide(playerid, BRZINOMER[11][playerid]); else if(newstate == PLAYER_STATE_DRIVER) PlayerTextDrawShow(playerid, BRZINOMER[11][playerid]);
- //--------------------------------------------------------------------//
- format(vrsta, sizeof(vrsta), "%s", ImenaVozila[GetVehicleModel(vozilo) - 400]);
- PlayerTextDrawSetString(playerid, BRZINOMER[9][playerid], vrsta);
- PlayerTextDrawSetPreviewVehCol(playerid, BRZINOMER[4][playerid], 1, 1);
- PlayerTextDrawSetPreviewModel(playerid, BRZINOMER[4][playerid], GetVehicleModel(vIDs));
- if(newstate == PLAYER_STATE_DRIVER)
- {
- PlayerTextDrawShow(playerid, BRZINOMER[5][playerid]);
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
- if(engine == 0 || engine == -1)
- {
- format(string, sizeof(string), "~r~o");
- PlayerTextDrawSetString(playerid,BRZINOMER[5][playerid], string);
- }
- else if(engine == 1)
- {
- format(string, sizeof(string), "~g~o");
- PlayerTextDrawSetString(playerid,BRZINOMER[5][playerid], string);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement