Need a little bit more explanation... So here is my stats command how the hell I can get it in to it?
pawn Код:
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 Sexs = pInfo[playerid][Education];
new string[500];
format(string,sizeof(string),"Password: %s | Admin: %d | Vip: %d | Sex: %d | Respect: %d | Money: %d | Kills: %d | Deaths: %d |",Passw,Admins,Vips,Sexs,Respects,Moneys,Killss,Deathss);
SendClientMessage(playerid,COLOR_WHITE,string);
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);
SendClientMessage(playerid,COLOR_WHITE,string);
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);
SendClientMessage(playerid,COLOR_WHITE,string);
format(string,sizeof(string),"Skin: %d| City: %d| Scores: %d| Fighting: %s| Age: %d| Religion: %d| Education: %d|",Skins,Citys,Scoress,Fightings,Ages,Religions,Educations);
SendClientMessage(playerid,COLOR_WHITE,string);
}
return 1;
}
tryed something like this
pawn Код:
//Under /stats cmd
new Fightings = fightingstyles[pInfo[playerid][Fighting]-1]; //and this is the last error!
//Just added in code
new fightingstyles[6][] = {
{"Boxing"},
{"KungFu"},
{"Knee Head"},
{"HeadGrab"},
{"KickElbow"},
};//This line
Errors:
error 029: invalid expression, assumed zero
(65) : error 008: must be a constant expression; assumed zero
(707) : error 033: array must be indexed (variable "-unknown-")