Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OVDJE
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER) //mjesto vozača
- {
- new carid= GetPlayerVehicleID(playerid);
- if(vAutoskola(carid) && (Polaganje[playerid] != 1)) //provjerava dali je ušao u vozilo autškole i da li mu je varijabla za polaganje na 1
- {
- SCM(playerid, -1, "Ne mozes voziti vozilo od autoskole"); //izbacuje poruku igraču
- RemovePlayerFromVehicle(playerid); //izbacuje igrača iz vozila
- }
- //Sada ćemo staviti da vam izbaci upozorenje ako uđete u vozilo a nemate dozvolu
- if(PI[playerid][pDozvola] == 0)
- {
- SCM(playerid, -1, "Nemate vozacku dozvolu, pripazite na policiju!");//šalje poruku
- }
- return 1;
- }
- if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- TextDrawShowForPlayer(playerid, kmhBrzina);
- TextDrawShowForPlayer(playerid, BrzinaBox);
- TextDrawShowForPlayer(playerid, Status[0]);
- TextDrawShowForPlayer(playerid, Status[1]);
- TextDrawShowForPlayer(playerid, Status[2]);
- }
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- TextDrawHideForPlayer(playerid, kmhBrzina);
- TextDrawHideForPlayer(playerid, BrzinaBox);
- TextDrawHideForPlayer(playerid, Status[0]);
- TextDrawHideForPlayer(playerid, Status[1]);
- TextDrawHideForPlayer(playerid, Status[2]);
- }
- return 1;
- return 1;
- }
- I OVDJE U OVOJ KOMANDI
- CMD:veh(playerid, params[])
- {
- if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Usage: /veh [id/name]");
- new iModel = 0;
- if(!IsNumeric(params))
- {
- for(new i; i < sizeof(Vozilos); i++)
- {
- if(!strcmp(params, Vozilos[i]))
- {
- iModel = i;
- break;
- }
- }
- if(iModel = 0) return SendClientMessage(playerid, COLOR_RED, "Niste unijeli pravilan ID Auta!");
- }
- else iModel = strval(params);
- if(iModel > 611 || iModel < 400) return SendClientMessage(playerid, COLOR_RED, "Izaberite model Auta od 400 do 611.");
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- PutPlayerInVehicle(playerid, CreateVehicle(iModel, x, y, z, 0.0, -1, -1, -1), 0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement