AlexRap

Untitled

May 15th, 2020
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. function ShowLicenses(playerid, id) {
  2. new text1[20], text2[20], text3[20], text4[20], string[128];
  3. if(playerVariables[id][pCarLic] == 1) { text1 = "Passed"; } else { text1 = "Not Passed"; }
  4. if(playerVariables[id][pFlyLic] == 1) { text2 = "Passed"; } else { text2 = "Not Passed"; }
  5. if(playerVariables[id][pBoatLic] == 1) { text3 = "Passed"; } else { text3 = "Not Passed"; }
  6. if(playerVariables[id][pGunLic] == 1) { text4 = "Passed"; } else { text4 = "Not Passed"; }
  7.  
  8. SCMF(playerid, COLOR_WHITE, "---- %s's licenses ----", GetName(id));
  9.  
  10. if(playerVariables[id][pCarLicT] == 0) {
  11. if(playerVariables[id][pCarLicSuspend] == 0) format(string, sizeof(string), "Drivers licence: %s", text1);
  12. else if(playerVariables[id][pCarLicSuspend] > 0) format(string, sizeof(string), "Drivers licence: Suspended (suspended for %d hours)", playerVariables[id][pCarLicSuspend]);
  13. }
  14. else format(string, sizeof(string), "Drivers licence: %s (expires in %d hours)", text1, playerVariables[id][pCarLicT]);
  15. SendClientMessage(playerid, COLOR_WHITE, string);
  16.  
  17. if(playerVariables[id][pFlyLicT] == 0) format(string, sizeof(string), "Flying licence: %s", text2);
  18. else format(string, sizeof(string), "Flying licence: %s (expires in %d hours)", text2, playerVariables[id][pFlyLicT]);
  19. SendClientMessage(playerid, COLOR_WHITE, string);
  20.  
  21. if(playerVariables[id][pBoatLicT] == 0) format(string, sizeof(string), "Boat licence: %s", text3);
  22. else format(string, sizeof(string), "Boat licence: %s (expires in %d hours)", text3, playerVariables[id][pBoatLicT]);
  23. SendClientMessage(playerid, COLOR_WHITE, string);
  24.  
  25. if(playerVariables[id][pGunLicT] == 0) {
  26. if(playerVariables[id][pGunLicSuspend] == 0) format(string, sizeof(string), "Weapon licence: %s", text4);
  27. else if(playerVariables[id][pGunLicSuspend] > 0) format(string, sizeof(string), "Weapon licence: Suspended (suspended for %d hours)", playerVariables[id][pGunLicSuspend]);
  28. }
  29. else format(string, sizeof(string), "Weapon licence: %s (expires in %d hours)", text4, playerVariables[id][pGunLicT]);
  30. SendClientMessage(playerid, COLOR_WHITE, string);
  31.  
  32. SendClientMessage(playerid, COLOR_WHITE,"------------");
  33. return 1;
  34. }
Add Comment
Please, Sign In to add comment