Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IRCCMD:getinfo(botid, channel[], user[], host[], params[]) {
- if (IRC_IsHalfop(botid, channel, user))
- {
- new playerid;
- // If the user did enter a player ID, then the command will not be processed
- if (sscanf(params, "d", playerid)) { return 1; }
- // If the player is not connected, then nothing will be done
- if (IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
- {
- new string[128];
- new Float:playeridhealth, Float:playeridarmour, playerip[128], Float:x, Float:y, Float:z, tmp2[512], file[256],
- year, month, day, P1Jailed[4], P1Frozen[4], P1Logged[4], P1Register[4], RegDate[512], TimesOn;
- GetPlayerHealth(playerid,playeridhealth);
- GetPlayerArmour(playerid,playeridarmour);
- GetPlayerIp(playerid, playerip, sizeof(playerip));
- GetPlayerPos(playerid,x,y,z);
- getdate(year, month, day);
- format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(PlayerName2(playerid)));
- if(PlayerInfo[playerid][Jailed] == 1) P1Jailed = "Yes"; else P1Jailed = "No";
- if(PlayerInfo[playerid][Frozen] == 1) P1Frozen = "Yes"; else P1Frozen = "No";
- if(PlayerInfo[playerid][LoggedIn] == 1) P1Logged = "Yes"; else P1Logged = "No";
- if(fexist(file)) P1Register = "Yes"; else P1Register = "No";
- if(dUserINT(PlayerName2(playerid)).("LastOn")==0) tmp2 = "Never"; else tmp2 = dini_Get(file,"LastOn");
- if(strlen(dini_Get(file,"RegisteredDate")) < 3) RegDate = "n/a"; else RegDate = dini_Get(file,"RegisteredDate");
- TimesOn = dUserINT(PlayerName2(playerid)).("TimesOnServer");
- new Sum, Average, w;
- while (w < PING_MAX_EXCEEDS) {
- Sum += PlayerInfo[playerid][pPing][w];
- w++;
- }
- Average = (Sum / PING_MAX_EXCEEDS);
- format(string, sizeof(string),"11(Player Info) ---====> Name: %s ID: %d <====---",PlayerName2(playerid), playerid);
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- format(string, sizeof(string),"4Health: %d Armour: %d Score: %d Cash: $%d Bank: $%d Skin: %d IP: %s[%s]",floatround(playeridhealth),floatround(playeridarmour),
- GetPlayerScore(playerid),GetPlayerMoney(playerid),PlayerInfo[playerid][bank],GetPlayerSkin(playerid),playerip,GetPlayerCountryName(playerid));
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- 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);
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- 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] );
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- format(string, sizeof(string),"9Registered: %s Logged In: %s In Jail: %s Frozen: %s", P1Register, P1Logged, P1Jailed, P1Frozen );
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- format(string, sizeof(string),"9Last On Server: %s Register Date: %s Todays Date: %d/%d/%d", tmp2, RegDate, day,month,year );
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- if(IsPlayerInAnyVehicle(playerid)) {
- new Float:VHealth, carid = GetPlayerVehicleID(playerid); GetVehicleHealth(carid,VHealth);
- format(string, sizeof(string),"2VehicleID: %d Model: %d Vehicle Name: %s Vehicle Health: %d",carid, GetVehicleModel(carid), VehicleName[GetVehicleModel(carid)-400], floatround(VHealth) );
- IRC_GroupSay(gGroupID, channel, string);
- IRC_GroupSay(gGroupID2, channel, string);
- }
- new slot, ammo, weap, Count, WeapName[24], WeapSTR[128], p; WeapSTR = "11Weaps: ";
- for (slot = 0; slot < 14; slot++) { GetPlayerWeaponData(playerid, slot, weap, ammo); if( ammo != 0 && weap != 0) Count++; }
- if(Count < 1) return IRC_GroupSay(gGroupID, channel,"11Player has no weapons") && IRC_GroupSay(gGroupID2, channel,"11Player has no weapons");
- else {
- for (slot = 0; slot < 14; slot++)
- {
- GetPlayerWeaponData(playerid, slot, weap, ammo);
- if (ammo > 0 && weap > 0)
- {
- GetWeaponName(weap, WeapName, sizeof(WeapName) );
- if (ammo == 65535 || ammo == 1) format(WeapSTR,sizeof(WeapSTR),"11%s%s (1)",WeapSTR, WeapName);
- else format(WeapSTR,sizeof(WeapSTR),"11%s%s (%d)",WeapSTR, WeapName, ammo);
- p++;
- if(p >= 5) { IRC_GroupSay(gGroupID, channel, WeapSTR); format(WeapSTR, sizeof(WeapSTR), "11Weaps: "); p = 0;
- } else format(WeapSTR, sizeof(WeapSTR), "11%s, ", WeapSTR);
- }
- }
- if(p <= 4 && p > 0) {
- string[strlen(string)-3] = '.';
- IRC_GroupSay(gGroupID, channel, WeapSTR);
- IRC_GroupSay(gGroupID2, channel, WeapSTR);
- }
- }
- return 1;
- } else return IRC_GroupSay(gGroupID, channel, "4ERROR: Player is not connected") && IRC_GroupSay(gGroupID, channel, "4ERROR: Player is not connected");
- } 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");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement