Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #include <a_samp>
  2. #include <Pawn.CMD>
  3.  
  4. main(){}
  5. new gTeam[MAX_PLAYERS], gAdmin[MAX_PLAYERS];
  6.  
  7.  
  8. public OnPlayerConnect(playerid) {
  9. gAdmin[playerid] = 0;
  10. gTeam[playerid] = 0;
  11. return 1;
  12. }
  13.  
  14. CMD:getteam(playerid) {
  15. if(gAdmin[playerid] > 0) {
  16. new Float:Pos[4];
  17. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  18. for(new targetid = 0, maxs = GetPlayerPoolSize(); targetid <= maxs; targetid++) {
  19. if(IsPlayerConnected(targetid) && gTeam[targetid] == 1) {
  20. SetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
  21. SetPlayerInterior(targetid, GetPlayerInterior(playerid));
  22. SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid));
  23. SendClientMessage(targetid, -1, " You were summoned to this admin as they used /getteam.");
  24. }
  25. }
  26. }
  27. else
  28. SendClientMessage(playerid, -1, "{D7D7D7}You're not authorized to use this command!");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement