/Stats Naming Error
#1

I done this and it gives no errors.. But It doesnt work IG.
Код:
	if(PlayerInfo[playerid][pFaction] == 0) format(faction, sizeof(faction), "Fighter");
	else if(PlayerInfo[playerid][pFaction] == 1) format(faction, sizeof(faction), "Manager");
	else if(PlayerInfo[playerid][pFaction] == 2) format(faction, sizeof(faction), "Guard");
and this in /stats:

Код:
	format(string, sizeof(string), "Faction: %d", faction);
	SendClientMessage(playerid, -1, string);
and when I do /stats in game, it says Faction: 70
or Faction: 77

(( I have a command so that when I do /manager it sets the faction to 1 (Manager) but in this case it still doesnt work.
Reply
#2

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
I done this and it gives no errors.. But It doesnt work IG.
Код:
	if(PlayerInfo[playerid][pFaction] == 0) format(faction, sizeof(faction), "Fighter");
	else if(PlayerInfo[playerid][pFaction] == 1) format(faction, sizeof(faction), "Manager");
	else if(PlayerInfo[playerid][pFaction] == 2) format(faction, sizeof(faction), "Guard");
and this in /stats:

Код:
	format(string, sizeof(string), "Faction: %d", faction);
	SendClientMessage(playerid, -1, string);
and when I do /stats in game, it says Faction: 70
or Faction: 77

(( I have a command so that when I do /manager it sets the faction to 1 (Manager) but in this case it still doesnt work.
PHP код:
    format(stringsizeof(string), "Faction: %s"faction(playerid));
    
SendClientMessage(playerid, -1string); 
Reply
#3

@lulo356;

Nope.

@Jigsaw123;
Here you go buddy:
PHP код:
new str[32],string[128];
if(
PlayerInfo[playerid][pFaction] == 0) { str "Fighter"; }
format(string,sizeof(string),"Faction Name: %s",str);
SendClientMessage(playerid,-1,string);
...
etc
... 
For your stat code;

PHP код:
format(string,sizeof(string),"Faction ID: [%d]",PlayerInfo[playerid][pFaction]); 
Reply
#4

PHP код:
stock Adminhelpplay(playerid)
{
    new 
AdminHelpstats[32];
    if(
pInfo[playerid][AdminHelp] == 0format(AdminHelpstatssizeof(AdminHelpstats), "Player");
    else if(
pInfo[playerid][AdminHelp] == 1format(AdminHelpstatssizeof(AdminHelpstats),"Helper");
    else if(
pInfo[playerid][AdminHelp] == 2format(AdminHelpstatssizeof(AdminHelpstats), "Moderator");
    else if(
pInfo[playerid][AdminHelp] == 3format(AdminHelpstatssizeof(AdminHelpstats), "Administrator");
    else if(
pInfo[playerid][AdminHelp] == 4format(AdminHelpstatssizeof(AdminHelpstats), "Trusted Player");
    return 
AdminHelpstats;

PHP код:
    new string[128], playerb;
     
format(stringsizeof(string), " Stats of %s (%s)"Lname(playerb), Adminhelpplay(playerid));
    
SendClientMessage(playeridCOLOR_ORANGEstring); 
I use the same, And this works fine for me, So yea... its not wrong.
Reply
#5

I didn't say that you are wrong.Just said "nope" and my mean was "maybe, he cannot understand." so i tried to explain with a few example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)