Need help - sscanf
#6

or Maybe like this? CMIIW.
If you only type /stats. it will show your stats
If you type /stats [giveplayerid] you will see giveplayerid stats

PHP код:
CMD:stats(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] > 11)
    {
        new 
giveplayeridstring[64];
        if(
sscanf(params"u"giveplayerid))
        {
            
SendClientMessageEx(playeridCOLOR_GREY"User Statistics for {665353}%s(%d) {AFAFAF}- Database ID: {665353}%d"GetName(playerid), playeridPlayerInfo[playerid][ID]);
            return 
1;
        }
        else
        {
            
SendClientMessageEx(playeridCOLOR_GREY"User Statistics for {665353}%s(%d) {AFAFAF}- Database ID: {665353}%d"GetName(giveplayerid), PlayerInfo[giveplayerid][ID], PlayerInfo[giveplayerid][ID]);
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"{A9A9A9}ERROR: You don't have permission to use command.");
        return 
1;
    }
    return 
1;

Reply


Messages In This Thread
Need help - sscanf - by Score - 27.09.2018, 11:53
Re: Need help - sscanf - by m4karow - 27.09.2018, 11:56
Re: Need help - sscanf - by Score - 27.09.2018, 11:57
Re: Need help - sscanf - by AlfaSufaIndo - 27.09.2018, 12:10
Re: Need help - sscanf - by Score - 27.09.2018, 12:11
Re: Need help - sscanf - by AlfaSufaIndo - 27.09.2018, 13:14

Forum Jump:


Users browsing this thread: 1 Guest(s)