Advertisement
PaulCastellano

recon

Mar 6th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. YCMD:recon(playerid, params[], help)
  2. {
  3. if (PlayerInfo[playerid][pGM] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
  4. {
  5. new igrac, hIme[MAX_PLAYER_NAME], Float:hp, izvr[MAX_PLAYER_NAME];
  6. if(sscanf(params, "u", igrac)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koristite: {FFFFFF}/recon [Korisnicki ID ili Ime Korisnika]");
  7. if(!IsPlayerConnected(igrac)) return SendClientMessage(playerid,-1, ""CRVENA "Greska |{FFFFFF} Taj igrac nije online!");
  8. GetPlayerName(igrac, hIme, sizeof(hIme));
  9. GetPlayerHealth(igrac, hp);
  10. IgracNaReconu[playerid] = true;
  11. GetPlayerName(playerid, izvr, sizeof(izvr));
  12. format(CmdString, 64, "|RECON| %s(%i), $%d, H: %.1f", hIme, igrac, PlayerInfo[igrac][pNovacDzep], hp);
  13. SendClientMessage(playerid, CRVENA3, CmdString);
  14. new string[128];
  15. format(string,sizeof(string),""SPLAVA"|A|Recon| %s recona igraca "BELA"%s !",GetName(playerid),GetName(igrac));
  16. APoruka(-1,string);
  17. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  18. {
  19. new f = 0;
  20. ploop(i)
  21. {
  22. if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) f++;
  23. }
  24. if(f == 0) SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  25. }
  26. SetPlayerInterior(playerid, GetPlayerInterior(igrac));
  27. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(igrac));
  28. TogglePlayerSpectating(playerid, 1);
  29. if(IsPlayerInAnyVehicle(igrac)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(igrac));
  30. else PlayerSpectatePlayer(playerid, igrac);
  31. }
  32. else return SendClientMessage(playerid,-1, ""BELA "[{F81414}Anti-Cheat{FFFFFF}]{DBDBDB} Admini samo!");
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement