/stats | Question: is this possible
#6

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Hmm.. Modify this code according to yours.

add this in /stats cmd:

pawn Код:
new factiontype[20];
if(PlayerInfo[playerid][faction] == 1) factiontype = "LSPD";
if(PlayerInfo[playerid][faction] == 2) factiontype = "SFPD";
And then when you format the string for stats, replace the faction enum with "factiontype".
No need for that. Just:
pawn Код:
format(string,sizeof(string),"Faction: %s",GetFactionName(playerid));
So the whole code:
pawn Код:
new factionname[2][] = {//On top of your script
    {"Civilian"},{"RCSD"}
};

format(string,sizeof(string),"Faction: %s",GetFactionName(playerid));//On your /stats

GetFactionName(playerid)//On bottom of your Script
{
    new GFN[20];
    format(GFN,sizeof(GFN),factionname[P_Data[playerid][Faction]]);
    return GFN;
}
Reply


Messages In This Thread
/stats | Question: is this possible - by DaRealz - 24.06.2011, 20:00
Re: /stats | Question: is this possible - by Calgon - 24.06.2011, 20:01
Re: /stats | Question: is this possible - by GangsTa_ - 24.06.2011, 20:01
Re: /stats | Question: is this possible - by =WoR=Varth - 24.06.2011, 20:04
Re: /stats | Question: is this possible - by iPLEOMAX - 24.06.2011, 20:09
Re: /stats | Question: is this possible - by =WoR=Varth - 24.06.2011, 20:14
Re: /stats | Question: is this possible - by iPLEOMAX - 24.06.2011, 20:27

Forum Jump:


Users browsing this thread: 2 Guest(s)