/stats dialog problem.. -
qUick1337 - 17.03.2011
i made a /stats dialog and i have a problem.. when i write /stats i get "SERVER: Unknown command."
Code:
new string3[256],string4[256],string5[256],string6[256],string7[256],string8[256],statsstring[2256];
format(string3, sizeof string3, "Level:[%d] Sex:[%s] Age:[%d] Spawn:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] PhoneNumber:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
format(string4, sizeof string4, "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
format(string5, sizeof string5, "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests);
format(string6, sizeof string6, "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
format(string7, sizeof string7, "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s] Rob:[%d/15]",drugs,mats,ttext,dtext,ftext,rtext,robstat);
format(string8, sizeof string8, "Warns:[%d] AdminLevel:[%d] HelperLevel: [%d] Crack:[%d]",warns,adminl,helperl,crack);
format(statsstring, sizeof statsstring, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",string3,string4,string5,string6,string7,string8,string8);
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, 0, "Stats",statsstring,"Iesi", "");
where is the problem ?
Re: /stats dialog problem.. -
Pooh7 - 17.03.2011
pawn Code:
new string3[256],string4[256],string5[256],string6[256],string7[256],string8[256],statsstring[2256];
format(string3, sizeof string3, "Level:[%d] Sex:[%s] Age:[%d] Spawn:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] PhoneNumber:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
format(string4, sizeof string4, "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
format(string5, sizeof string5, "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests);
format(string6, sizeof string6, "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
format(string7, sizeof string7, "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s] Rob:[%d/15]",drugs,mats,ttext,dtext,ftext,rtext,robstat);
format(string8, sizeof string8, "Warns:[%d] AdminLevel:[%d] HelperLevel: [%d] Crack:[%d]",warns,adminl,helperl,crack);
format(statsstring, sizeof statsstring, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",string3,string4,string5,string6,string7,string8,string8);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Stats",statsstring,"Iesi", "");
Re: /stats dialog problem.. -
Stigg - 17.03.2011
After:
Code:
public OnPlayerCommandText(playerid, cmdtext[])
In your gm and fs.
Perhaps ?
Re: /stats dialog problem.. -
Cameltoe - 17.03.2011
A tip
Arrays:
pawn Code:
new string[7][256];
format(string[0], sizeof(string), "");
Format:
pawn Code:
format(string, sizeof(string), "something");
format(string, sizeof(string), "%s cool", string);
string would now print "something cool"
Re: /stats dialog problem.. -
qUick1337 - 17.03.2011
Code:
new string3[256],string4[256],string5[256],string6[256],string7[256],string8[256],statsstring[2256];
format(string3, sizeof string3, "Level:[%d] Sex:[%s] Age:[%d] Spawn:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] PhoneNumber:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
format(string4, sizeof string4, "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
format(string5, sizeof string5, "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests);
format(string6, sizeof string6, "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
format(string7, sizeof string7, "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s] Rob:[%d/15]",drugs,mats,ttext,dtext,ftext,rtext,robstat);
format(string8, sizeof string8, "Warns:[%d] AdminLevel:[%d] HelperLevel: [%d] Crack:[%d]",warns,adminl,helperl,crack);
format(statsstring, sizeof statsstring, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",string3,string4,string5,string6,string7,string8,string8);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Stats",statsstring,"Iesi", "");
i edited
statsstring[2256] to
statsstring[256] and now i've got this
http://postimage.org/image/1g2r69dyc/
Re: /stats dialog problem.. -
Cameltoe - 17.03.2011
It wouldn't show the rest as the string size is too low.
Re: /stats dialog problem.. -
qUick1337 - 17.03.2011
and how i can make it bigger ?
Re: /stats dialog problem.. -
Cameltoe - 17.03.2011
statsstring[256] to statsstring[1000] or statsstring[2000].
Re: /stats dialog problem.. -
qUick1337 - 17.03.2011
now i get "Server: Unknown command"... WTF X(
Re: /stats dialog problem.. -
Jochemd - 17.03.2011
Show whole command