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