/stats command
#14

Alright first of all code is a mess.

Why would you create a new variable to show another since they are already defined? It makes no sense but we won't blame you now, it's fine but code is a mess and it's confusing.

So this is a basic command that will show your admin level
Код:
 CMD: myadminlevel(playerid, params[])
{
 new string[95]; // slightly increse value of this if some of the stats don't show up 
  format(string,sizeof(string),"My Admin Level is:  %i",PlayerInfo[playerid][pAdmin]);  
 SendClientMessage(playerid, -1, string);
 return 1;
}
%i is used to display numbers such as level of XP. STRING - %s is used to display a text, for an example your password or nickname. Float %f is used to display Coords/Health/Armor because float is a number but float is a decimal place (5.554545)

Let's focus on your case @ButlerSmcs

First of all, variables do not match the user stats system. Means pScore (inside that enum) is not affiliated with your code. Look for in your script for something like this:
Код:
enum pInfo 
{ 
   pAdmin,
}
Paste it here so we can begin with replacing it. Or you can do it alone! If your score variable is named Score instead of pScore in your command replace pScore with Score.
Reply


Messages In This Thread
/stats command - by Azzeto - 13.10.2011, 18:14
Re: /stats command - by MonkZemun - 13.10.2011, 18:19
Re: /stats command - by Azzeto - 13.10.2011, 18:21
Re: /stats command - by MonkZemun - 13.10.2011, 18:28
Re: /stats command - by Azzeto - 13.10.2011, 18:30
Re: /stats command - by Giovanni - 13.10.2011, 18:32
Re: /stats command - by Azzeto - 13.10.2011, 18:36
Re: /stats command - by Azzeto - 13.10.2011, 18:54
Re: /stats command - by SmiT - 13.10.2011, 19:14
Re: /stats command - by Kush - 13.10.2011, 19:29
Re: /stats command - by Azzeto - 13.10.2011, 19:40
Re: /stats command - by Pillhead2007 - 24.03.2013, 16:49
Re: /stats command - by ButlerSmcs - 29.07.2017, 10:11
Re: /stats command - by Fratello - 29.07.2017, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)