Guest User

Untitled

a guest
Dec 14th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. IRCCMD:track(botid, channel[], user[], host[], params[]) {
  2. if(IRC_IsHalfop(botid, channel, user) || (IRC_IsOp(botid, channel, user)) || (IRC_IsAdmin(botid, channel, user)) || (IRC_IsOwner(botid, channel, user))) {
  3. if (isnull(params)) {
  4. IRC_Notice(botid, user,"USAGE: !track <PlayerID>");
  5. }
  6. if(!IsPlayerConnected(strval(params)))
  7. return IRC_Notice(gGroupID, "%#mmtech.echo", "4*** Error: Invalid Player ID");
  8. new giveid, name[256], position[256], score[256], health[256], money[256], playerIP[16], IP[256], Float: Health, Float: Armour;
  9. new Float:X,Float:Y,Float:Z,Float:A;
  10. giveid = ReturnUserIRC(params);
  11. GetPlayerIp(giveid, playerIP, sizeof(playerIP));
  12. GetPlayerPos(giveid,X,Y,Z);
  13. GetPlayerFacingAngle(giveid,A);
  14. GetPlayerHealth(giveid,Health);
  15. GetPlayerArmour(giveid,Armour);
  16. format(name,256,"4 ID: %d ID: %s",strval(params),PlayerNameIRC(strval(params)));
  17. IRC_Notice(gGroupID, "%#mmtech.echo", name);
  18. format(IP,16,"4 IP of player %s (ID:%d): %d",PlayerNameIRC(giveid),giveid,GetPlayerIp(giveid));
  19. IRC_Notice(gGroupID, "%#mmtech.echo",IP);
  20. format(position,256,"4 Position from %s (ID:%d): X: %f10, Y: %f10, Z: %f10, A: %f",PlayerNameIRC(giveid),giveid,X,Y,Z,A);
  21. IRC_Notice(gGroupID, "%#mmtech.echo",position);
  22. format(score,256,"4 Score from %s (ID:%d): %d",PlayerNameIRC(giveid),giveid,GetPlayerScore(giveid));
  23. IRC_Notice(gGroupID, "%#mmtech.echo",score);
  24. format(health,256,"4 (%s) Health: %s %.0f - Armour: %s %.0f",PlayerNameIRC(giveid),PercentBar(Health),Health,PercentBar(Armour),Armour);
  25. IRC_Notice(gGroupID, "%#mmtech.echo",health);
  26. format(money,256,"4 Money from %s (ID:%d): $%d",PlayerNameIRC(giveid),giveid,GetPlayerMoney(giveid));
  27. IRC_Notice(gGroupID, "%#mmtech.echo",money);
  28. }
  29. return 1;
  30. }
Add Comment
Please, Sign In to add comment