25.02.2013, 21:01
So the pInfo[playerid][Fighting] is norml style when it's 1? And you want it to say Fightinstyle: normal instead of Fightingstyle: 1 in the /stats command?
I have to say that I have never done it before but I tried anyways
On the top of the script:
You can add more fightingstyle names as long as you increase the array.
Insert this where your fighting style integer in the stats string is: fightingstyles[pInfo[playerid][Fighting]-1
I haven't compiled this but it should work as it is if you do this.
Tell me if it gives errors.
If the current doesn't work it's fightingstyles[pInfo[playerid][Fighting-1]]
I have to say that I have never done it before but I tried anyways

On the top of the script:
Код:
new fightingstyles[1][] = {
{"Normal"}};
Insert this where your fighting style integer in the stats string is: fightingstyles[pInfo[playerid][Fighting]-1
I haven't compiled this but it should work as it is if you do this.
Код:
YCMD:stats(playerid,params[],help)
{
if(IsPlayerConnected(playerid))
{
new Passw = pInfo[playerid][Pass];
new Admins = pInfo[playerid][Admin];
new Vips = pInfo[playerid][Vip];
new Respects = pInfo[playerid][Respect];
new Moneys = pInfo[playerid][Money];
new Killss = pInfo[playerid][Kills];
new Deathss = pInfo[playerid][Deaths];
new Arresteds = pInfo[playerid][Arrested];
new Jaileds = pInfo[playerid][Jailed];
new Kickeds = pInfo[playerid][Kicked];
new Banneds = pInfo[playerid][Banned];
new Joineds = pInfo[playerid][Joined];
new Members = pInfo[playerid][Member];
new Leaders = pInfo[playerid][Leader];
new Houses = pInfo[playerid][House];
new Cars = pInfo[playerid][Car];
new Keyss = pInfo[playerid][Keys];
new Keys1s = pInfo[playerid][Keys1];
new Keys2s = pInfo[playerid][Keys2];
new Keys3s = pInfo[playerid][Keys3];
new Keys4s = pInfo[playerid][Keys4];
new Warneds = pInfo[playerid][Warned];
new Tickets = pInfo[playerid][Ticket];
new JoinedEvents = pInfo[playerid][JoinedEvent];
new Cookies = pInfo[playerid][Cookie];
new Skins = pInfo[playerid][Skin];
new Citys = pInfo[playerid][City];
new Scoress = pInfo[playerid][Scores];
new Fightings = pInfo[playerid][Fighting];
new Ages = pInfo[playerid][Age];
new Religions = pInfo[playerid][Religion];
new Educations = pInfo[playerid][Education];
new string[500];
format(string,sizeof(string),"Password: %s | Admin: %d | Vip: %d | Respect: %d | Money: %d | Kills: %d | Deaths: %d |",Passw,Admins,Vips,Respects,Moneys,Killss,Deathss);
format(string,sizeof(string),"Arrested: %d | Jailed: %d | Kicked: %d| Banned: %d| Joined: %d| Member: %d| Leader: %d|",Arresteds,Jaileds,Kickeds,Banneds,Joineds,Members,Leaders);
format(string,sizeof(string),"House: %d| Car: %d| Key: %d| Key1: %d| Key2: %d| Key3: %d| Key4: %d| Events: %d| Warns: %d| Tickets: %d| Cookies: %d|",Houses,Cars,Keyss,Keys1s,Keys2s,Keys3s,Keys4s,JoinedEvents,Warneds,Tickets,Cookies);
format(string,sizeof(string),"Skin: %d| City: %d| Scores: %d| Fighting: %d| Age: %d| Religion: %d| Education: %d|",Skins,Citys,Scoress,fightingstyles[pInfo[playerid][Fighting]-1],Ages,Religions,Educations);
SendClientMessage(playerid,COLOR_WHITE,string);//This line is giving errors...
}
return 1;
}
If the current doesn't work it's fightingstyles[pInfo[playerid][Fighting-1]]

