TonyVk

Untitled

Sep 28th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2. {
  3. new sendername[MAX_PLAYER_NAME];
  4. new ulaziuv[64];
  5. GetPlayerName(playerid, sendername, sizeof(sendername));
  6. format(ulaziuv, sizeof(ulaziuv), " %s ulazi u vozilo.", sendername);
  7. ProxDetector(30.0, playerid, ulaziuv, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  8. new Float:Poz[3]; GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  9. if(!ispassenger)
  10. {
  11. for(new i; i < sizeof(VoziloInfo); i++)
  12. {
  13. if(VoziloInfo[i][vID] == vehicleid)
  14. {
  15. if(VoziloInfo[i][vImaVlasnika] == 1)
  16. {
  17. if(PlayerInfo[playerid][pPosedovanjeAuta] == i || VoziloInfo[i][vZakljucan] == 0 || PlayerInfo[playerid][pAdmin] == 6 || PlayerInfo[playerid][pAdmin] == 5 || PlayerInfo[playerid][pAdmin] == 7)
  18. {
  19. if(PlayerInfo[playerid][pAdmin] == 5) SCMF(playerid,-1,"[MC:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
  20. if(PlayerInfo[playerid][pAdmin] == 6) SCMF(playerid,-1,"[MC:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
  21. if(PlayerInfo[playerid][pAdmin] == 7) SCMF(playerid,-1,"[MC:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
  22. new string[128];
  23. format(string,sizeof(string), ""SPLAVA"Privatno Auto | "SIVA"Vlasnik: "SPLAVA"%s", VoziloInfo[i][vVlasnik]);
  24. SCM(playerid,-1,string);
  25. return 1;
  26. }
  27. else
  28. {
  29. new engine, lights, alarm, doors, bonnet, boot, objective;
  30. new string[128]; SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  31. format(string,sizeof(string), ""SPLAVA"Auto Zakljucan | "SIVA"Vlasnik: %s", VoziloInfo[i][vVlasnik]);
  32. SCM(playerid,-1,string);
  33. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  34. SetVehicleParamsEx(vehicleid, engine, lights, 1, doors, bonnet, boot, objective);
  35. return 1;
  36. }
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment