27.09.2018, 13:14
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
If you only type /stats. it will show your stats
If you type /stats [giveplayerid] you will see giveplayerid stats
PHP код:
CMD:stats(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] > 11)
{
new giveplayerid, string[64];
if(sscanf(params, "u", giveplayerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "User Statistics for {665353}%s(%d) {AFAFAF}- Database ID: {665353}%d", GetName(playerid), playerid, PlayerInfo[playerid][ID]);
return 1;
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "User Statistics for {665353}%s(%d) {AFAFAF}- Database ID: {665353}%d", GetName(giveplayerid), PlayerInfo[giveplayerid][ID], PlayerInfo[giveplayerid][ID]);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "{A9A9A9}ERROR: You don't have permission to use command.");
return 1;
}
return 1;
}