Advertisement
Guest User

Untitled

a guest
Feb 1st, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
  2. if(!ispassenger) {
  3. new vehicle = GetVehicleID(vehicleid), string[128];
  4. if(ServerVehicles[vehicle][vID] != 0 && JobWorking[playerid] == 0) {
  5. if(vehicle >= 130 && vehicle <= 135) {
  6. if(GetPVarInt(playerid, "InLesson") == -1) return SCM(playerid, COLOR_GREY, "Nu ai o lectie activa!"), SlapPlayer(playerid);
  7. }
  8. else if(ServerVehicles[vehicle][vFaction] == 1 || ServerVehicles[vehicle][vFaction] == 2 || ServerVehicles[vehicle][vFaction] == 3) {
  9. if(ServerVehicles[vehicle][vRank] > PlayerInfo[playerid][pRank]) {
  10. format(string, sizeof(string), "Ai nevoie de rank %d pentru a lua acest vehicul.", ServerVehicles[vehicle][vRank]);
  11. SCM(playerid, COLOR_GREY, string);
  12. SlapPlayer(playerid);
  13. }
  14. else if(OnDuty[playerid] == 0 && IsACop(playerid)) {
  15. SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
  16. SlapPlayer(playerid);
  17. return 1;
  18. }
  19. else if(!IsACop(playerid)) {
  20. format(string, sizeof(string), "Nu faci parte din factiunea %s.", FactionName(ServerVehicles[vehicle][vFaction]));
  21. SCM(playerid, COLOR_GREY, string);
  22. SlapPlayer(playerid);
  23. }
  24. }
  25. else if(ServerVehicles[vehicle][vFaction] != PlayerInfo[playerid][pMember] && ServerVehicles[vehicle][vFaction] != 0) {
  26. format(string, sizeof(string), "Nu faci parte din factiunea %s.", FactionName(ServerVehicles[vehicle][vFaction]));
  27. SCM(playerid, COLOR_GREY, string);
  28. SlapPlayer(playerid);
  29. }
  30. else {
  31. if(OnDuty[playerid] == 0 && IsACop(playerid) && Copcar2(vehicle)) {
  32. SCM(playerid, COLOR_LGREEN, "Nu poti folosi vehiculele factiunii daca nu esti la datorie!");
  33. SlapPlayer(playerid);
  34. return 1;
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement