Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. CMD:setvw(playerid, params[])
  2. {
  3. static
  4. userid,
  5. world;
  6.  
  7. if (PlayerInfo[playerid][pAdmin] < 2)
  8. return SendClientMessage(playerid, COLOR_LIGHTRED, AUTH_ERROR);
  9.  
  10. if (sscanf(params, "ud", userid, world))
  11. return SendClientMessage(playerid, COLOR_LIGHTRED, "Koristenje:{FFFFFF} /setvw [playerid / deo imena] [virtual world]");
  12.  
  13. if (userid == INVALID_PLAYER_ID)
  14. return SendClientMessage(playerid, COLOR_LIGHTRED, "Igrac nije konektovan.");
  15.  
  16. if(world == PlayerInfo[userid][pWorld])
  17. return SendClientMessage(playerid, COLOR_LIGHTRED, "Igrac vec ima taj virtual world.");
  18.  
  19. if(userid == playerid)
  20. va_SendClientMessage(playerid, COLOR_YELLOW, "Postavio si sebi virtual world %d.", world);
  21.  
  22. else
  23. {
  24. va_SendClientMessage(userid, COLOR_YELLOW, "%s vam je postavio virtual world %d.", ReturnName(playerid, 0), world);
  25. va_SendClientMessage(playerid, COLOR_YELLOW, "Igracu %s je postavljen virtual world %d.", ReturnName(userid, 0), world);
  26. }
  27.  
  28. SetPlayerVirtualWorld(userid, world);
  29. PlayerInfo[userid][pWorld] = world;
  30.  
  31. return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement