Guest User

..

a guest
Jan 4th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. CMD:gotojob(playerid, params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
  4. if (IsPlayerConnected(playerid))
  5. {
  6. if(PlayerInfo[playerid][pAdmin] >=1)
  7. {
  8. new id;
  9. if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOR_GREY, "Scrie: /gotojob [job id]");
  10. if(id < 0 || id > 13) return SendClientMessage(playerid, COLOR_GREY, "Invalid job id");
  11. SetPlayerPos(playerid, JobInfo[id][jPosX], JobInfo[id][jPosY], JobInfo[id][jPosZ]);
  12. SetPlayerInterior(playerid, 0);
  13. SetPlayerVirtualWorld(playerid, 0);
  14. new string[180];
  15. format(string, sizeof(string), "%s used /gotojob %d.", GetName(playerid), JobInfo[id][jName], id);
  16. ABroadCast(COLOR_ADMCOMMANDS, string, 1);
  17. }
  18. else return SendClientMessage(playerid,COLOR_LIGHTGREEN3, AdminOnly);
  19. }
  20. return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment