Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid)
  2. {
  3. new string[128];
  4. if(VehInfo[vehicleid][vID] != 0 && VehInfo[vehicleid][vFaction] != 0)
  5. {
  6. if(VehInfo[vehicleid][vFaction] != PlayerInfo[playerid][pMember] && VehInfo[vehicleid][vFaction] != 0 && IsACop(playerid) != VehInfo[vehicleid][vFaction])
  7. {
  8. format(string, sizeof(string), "Acest vehicul poate fi condus doar de membrii factiunii %s.", NumeFactiune(VehInfo[vehicleid][vFaction]));
  9. SCM(playerid, COLOR_GREY, string);
  10. RemovePlayerFromVehicle(playerid);
  11. SlapPlayer(playerid);
  12. }
  13. else
  14. {
  15. if(VehInfo[vehicleid][vRank] > PlayerInfo[playerid][pRank])
  16. {
  17. format(string, sizeof(string), "Acest vehicul poate fi condus doar de membrii cu rank %d.", VehInfo[vehicleid][vRank]);
  18. SCM(playerid, COLOR_GREY, string);
  19. RemovePlayerFromVehicle(playerid);
  20. SlapPlayer(playerid);
  21. }
  22. }
  23. }
  24. if(VehInfo[vehicleid][vID] != 0 && VehInfo[vehicleid][vJob] != 0)
  25. {
  26. if(VehInfo[vehicleid][vJob] != PlayerInfo[playerid][pJob])
  27. {
  28. format(string, sizeof(string), "Acest vehicul poate fi condus doar de cei ce detin job-ul %s.", NumeJob(VehInfo[vehicleid][vJob]));
  29. SCM(playerid, COLOR_GREY, string);
  30. RemovePlayerFromVehicle(playerid);
  31. SlapPlayer(playerid);
  32. }
  33. }
  34. return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement