Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. IRCCMD:getinfo(botid, channel[], user[], host[], params[]) {
  2. if (IRC_IsHalfop(botid, channel, user))
  3. {
  4. new playerid;
  5. // If the user did enter a player ID, then the command will not be processed
  6. if (sscanf(params, "d", playerid)) { return 1; }
  7. // If the player is not connected, then nothing will be done
  8. if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
  9. {
  10. new string[128];
  11. new Float:playeridhealth, Float:playeridarmour, playerip[128], Float:x, Float:y, Float:z, tmp2[512], file[256],
  12. year, month, day, P1Jailed[4], P1Frozen[4], P1Logged[4], P1Register[4], RegDate[512], TimesOn;
  13.  
  14. GetPlayerHealth(playerid,playeridhealth);
  15. GetPlayerArmour(playerid,playeridarmour);
  16. GetPlayerIp(playerid, playerip, sizeof(playerip));
  17. GetPlayerPos(playerid,x,y,z);
  18. getdate(year, month, day);
  19. format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(PlayerName2(playerid)));
  20.  
  21. if(PlayerInfo[playerid][Jailed] == 1) P1Jailed = "Yes"; else P1Jailed = "No";
  22. if(PlayerInfo[playerid][Frozen] == 1) P1Frozen = "Yes"; else P1Frozen = "No";
  23. if(PlayerInfo[playerid][LoggedIn] == 1) P1Logged = "Yes"; else P1Logged = "No";
  24. if(fexist(file)) P1Register = "Yes"; else P1Register = "No";
  25. if(dUserINT(PlayerName2(playerid)).("LastOn")==0) tmp2 = "Never"; else tmp2 = dini_Get(file,"LastOn");
  26. if(strlen(dini_Get(file,"RegisteredDate")) < 3) RegDate = "n/a"; else RegDate = dini_Get(file,"RegisteredDate");
  27.  
  28. TimesOn = dUserINT(PlayerName2(playerid)).("TimesOnServer");
  29.  
  30. new Sum, Average, w;
  31. while (w < PING_MAX_EXCEEDS) {
  32. Sum += PlayerInfo[playerid][pPing][w];
  33. w++;
  34. }
  35. Average = (Sum / PING_MAX_EXCEEDS);
  36.  
  37. format(string, sizeof(string),"11(Player Info) ---====> Name: %s ID: %d <====---",PlayerName2(playerid), playerid);
  38. IRC_GroupSay(gGroupID, channel, string);
  39. IRC_GroupSay(gGroupID2, channel, string);
  40. format(string, sizeof(string),"4Health: %d Armour: %d Score: %d Cash: $%d Bank: $%d Skin: %d IP: %s[%s]",floatround(playeridhealth),floatround(playeridarmour),
  41. GetPlayerScore(playerid),GetPlayerMoney(playerid),PlayerInfo[playerid][bank],GetPlayerSkin(playerid),playerip,GetPlayerCountryName(playerid));
  42. IRC_GroupSay(gGroupID, channel, string);
  43. IRC_GroupSay(gGroupID2, channel, string);
  44. format(string, sizeof(string),"7Interior: %d Virtual World: %d Wanted Level: %d X %0.1f Y %0.1f Z %0.1f", GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), GetPlayerWantedLevel(playerid), Float:x,Float:y,Float:z);
  45. IRC_GroupSay(gGroupID, channel, string);
  46. IRC_GroupSay(gGroupID2, channel, string);
  47. format(string, sizeof(string),"8Ping: %d Average Ping: %d Times On Server: %d Kills: %d Deaths: %d Ratio: %0.2f AdminLevel: %d",GetPlayerPing(playerid), Average, TimesOn, PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], Float:PlayerInfo[playerid][Kills]/Float:PlayerInfo[playerid][Deaths], PlayerInfo[playerid][Level] );
  48. IRC_GroupSay(gGroupID, channel, string);
  49. IRC_GroupSay(gGroupID2, channel, string);
  50. format(string, sizeof(string),"9Registered: %s Logged In: %s In Jail: %s Frozen: %s", P1Register, P1Logged, P1Jailed, P1Frozen );
  51. IRC_GroupSay(gGroupID, channel, string);
  52. IRC_GroupSay(gGroupID2, channel, string);
  53. format(string, sizeof(string),"9Last On Server: %s Register Date: %s Todays Date: %d/%d/%d", tmp2, RegDate, day,month,year );
  54. IRC_GroupSay(gGroupID, channel, string);
  55. IRC_GroupSay(gGroupID2, channel, string);
  56.  
  57. if(IsPlayerInAnyVehicle(playerid)) {
  58. new Float:VHealth, carid = GetPlayerVehicleID(playerid); GetVehicleHealth(carid,VHealth);
  59. format(string, sizeof(string),"2VehicleID: %d Model: %d Vehicle Name: %s Vehicle Health: %d",carid, GetVehicleModel(carid), VehicleName[GetVehicleModel(carid)-400], floatround(VHealth) );
  60. IRC_GroupSay(gGroupID, channel, string);
  61. IRC_GroupSay(gGroupID2, channel, string);
  62. }
  63.  
  64. new slot, ammo, weap, Count, WeapName[24], WeapSTR[128], p; WeapSTR = "11Weaps: ";
  65. for (slot = 0; slot < 14; slot++) { GetPlayerWeaponData(playerid, slot, weap, ammo); if( ammo != 0 && weap != 0) Count++; }
  66. if(Count < 1) return IRC_GroupSay(gGroupID, channel,"11Player has no weapons") && IRC_GroupSay(gGroupID2, channel,"11Player has no weapons");
  67. else {
  68. for (slot = 0; slot < 14; slot++)
  69. {
  70. GetPlayerWeaponData(playerid, slot, weap, ammo);
  71. if (ammo > 0 && weap > 0)
  72. {
  73. GetWeaponName(weap, WeapName, sizeof(WeapName) );
  74. if (ammo == 65535 || ammo == 1) format(WeapSTR,sizeof(WeapSTR),"11%s%s (1)",WeapSTR, WeapName);
  75. else format(WeapSTR,sizeof(WeapSTR),"11%s%s (%d)",WeapSTR, WeapName, ammo);
  76. p++;
  77. if(p >= 5) { IRC_GroupSay(gGroupID, channel, WeapSTR); format(WeapSTR, sizeof(WeapSTR), "11Weaps: "); p = 0;
  78. } else format(WeapSTR, sizeof(WeapSTR), "11%s, ", WeapSTR);
  79. }
  80. }
  81. if(p <= 4 && p > 0) {
  82. string[strlen(string)-3] = '.';
  83. IRC_GroupSay(gGroupID, channel, WeapSTR);
  84. IRC_GroupSay(gGroupID2, channel, WeapSTR);
  85. }
  86. }
  87. return 1;
  88. } else return IRC_GroupSay(gGroupID, channel, "4ERROR: Player is not connected") && IRC_GroupSay(gGroupID, channel, "4ERROR: Player is not connected");
  89. } else return IRC_GroupSay(gGroupID, channel, "4ERROR: You need to be channel half operator to use this command") && IRC_GroupSay(gGroupID, channel, "4ERROR: You need to be channel half operator to use this command");
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement