Advertisement
Guest User

Untitled

a guest
Mar 29th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. if(newkeys == KEY_YES) {
  2. new string[180], str[180], job;
  3. if(PlayerInfo[playerid][pJob] != 0) return SendClientMessage(playerid, COLOR_WHITE, "Ai deja un job. Pentru a renunta la el, poti folosi comanda /quitjob.");
  4. for(new j = 1; j < MAX_JOBS; j++) {
  5. if(PlayerToPoint(3.0, playerid, JobInfo[j][jPosX], JobInfo[j][jPosY], JobInfo[j][jPosZ]) && j != 7) {
  6. if(PlayerInfo[playerid][pLevel] < JobInfo[j][jLevel]) {
  7. format(string, sizeof(string), "Ai nevoie de level %d pentru a lua jobul %s.", JobInfo[j][jLevel], JobInfo[j][jName]);
  8. SendClientMessage(playerid, COLOR_WHITE, string);
  9. return 1;
  10. }
  11. format(string, sizeof(string), "* Felicitari! Noul tau job este acum %s.", JobInfo[j][jName]);
  12. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  13.  
  14. if(j == 7) SCM(playerid, COLOR_LIGHTBLUE, "Comenzile disponibile pentru acest job sunt: /repair si /refill.");
  15. else if(j == 8) SCM(playerid, COLOR_LIGHTBLUE, "Pentru a localiza un player, foloseste comanda /find.");
  16. else if(j != 6) SCM(playerid, COLOR_LIGHTBLUE, "Pentru a incepe sa muncesti, ai la dispozitie comanda /work.");
  17.  
  18. PlayerInfo[playerid][pJob] = j;
  19. job = 1;
  20. }
  21. if(job == 0) return SendClientMessage(playerid, COLOR_GREY, "Nu te aflii in jurul unui punct de job.");
  22. mysql_format(SQL, str, 128, "UPDATE `users` SET `Job`='%d' WHERE `ID`='%d' LIMIT 1",PlayerInfo[playerid][pJob],PlayerInfo[playerid][pSQLID]);
  23. mysql_tquery(SQL, str, "", "");
  24. return 1;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement