cmd /info
#1

Hello guys i want cmd like /info playerid if im was admin and see some info about the player like hes health hes ping hes ip etc
Reply
#2

You use ZCMD?
Reply
#3

yes......
Reply
#4

PHP код:
CMD:info(playeridparams[])
{
    new 
string[256], playerbPing,  pIP[16], FloatArmourFloatHealthName[MAX_PLAYER_NAME+1];
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLORHERE"You are not an authorized to use this command.");
    if(
sscanf(params"i"playerb)) return SendClientMessage(playeridCOLORHERE"[Usage]: /info [PlayerID]");
    
GetPlayerHealth(playerbHealth);
    
GetPlayerArmour(playeridArmour);
    
GetPlayerName(playeridNamesizeof(Name));
    
GetPlayerIp(playeridpIPsizeof(pIP));
    
Ping GetPlayerPing(playerid);
    
format(stringsizeof(string), "Name: %s | Ping: %d | IP: %s | Health: %f | Armour: %f"NamePingpIPHealthArmour);
    
SendMessageAdmin(COLORHEREstring);
    return 
1;

Something like that.

Edit: IsPlayerAdmin(playerid), SendMessageAdmin , COLORHERE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)