[HELP] showplayerdialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] showplayerdialog (
/showthread.php?tid=495897)
[HELP] showplayerdialog -
Odieeeee - 19.02.2014
Here is my code :
Код:
CMD:statses(playerid, params[])
{
new codordsstring[768];
new recodordsstring[768];
new health = PlayerInfo[playerid][pHealth];
new armor = PlayerInfo[playerid][pArmor];
new cash = GetPlayerCash(playerid);
new sext = PlayerInfo[playerid][pSex];
new job1 = PlayerInfo[playerid][pJob];
new job2 = PlayerInfo[playerid][pJob2];
new jlevel = PlayerInfo[playerid][pJob];
new jlevel2 = PlayerInfo[playerid][pJob2];
new married = PlayerInfo[playerid][pMarriedTo];
new insur = PlayerInfo[playerid][pInsurance];
new upgradep = PlayerInfo[playerid][gPupgrade];
new age = PlayerInfo[playerid][pAge];
new ptime = PlayerInfo[playerid][pConnectTime];
new account = PlayerInfo[playerid][pAccount];
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new exp = PlayerInfo[playerid][pExp];
new expamount = nxtlevel*levelexp;
new costlevel = nxtlevel*levelcost;
new drank = PlayerInfo[playerid][pDonateRank];
new level = PlayerInfo[playerid][pLevel];
new totalwealth = account + cash;
format(codordsstring, sizeof(codordsstring),"{0xFFFF00AA}VIP LEVEL: %s\r\n{FFFFFF}Level: %d\r\n{FFFFFF}Gender: %s\r\n{FFFFFF}Age: %d\r\n{FFFFFF}Cash: %d\r\n{FFFFFF}Health: %d.1f\r\n{FFFFFF}Armor: %d.1f", drank,level,sext,age,totalwealth,health,armor);
strcat(recodordsstring, codordsstring, sizeof(recodordsstring));
format(codordsstring, sizeof(codordsstring),"\r\n{FFFFFF}Married to: %s\r\n{FFFFFF}Playing Hours: %d\r\n{FFFFFF}Upgrade Points: %d\r\n{FFFFFF}Next Level: %d/%d($%d)\r\n{FFFFFF}Job1: %s\r\n{FFFFFF}Job2: %s\r\n{FFFFFF}Insurance: %s\r\n", married,ptime,upgradep,exp,expamount,costlevel,job1,job2,insur);
strcat(recodordsstring, codordsstring, sizeof(recodordsstring));
ShowPlayerDialog(playerid, 3881, DIALOG_STYLE_MSGBOX, "STATS",codordsstring,"Next Page","Close");
return 1;
}
When i recompile it there's no error pops up. But when i try it on game it shows this :
PLEASE HELP ME! Thank you
Re: [HELP] showplayerdialog -
klimgorilla - 19.02.2014
Are you sure that PlayerInfo[playerid][pJob] is a string?
Re: [HELP] showplayerdialog -
Clad - 19.02.2014
Код:
job1 = PlayerInfo[playerid][pJob];
Maybe you're not in indetified job so the server couldn't load it name
Re: [HELP] showplayerdialog -
Smileys - 19.02.2014
Here you give it an integer value;
pawn Код:
new job1 = PlayerInfo[playerid][pJob];
and here you give it a String value:
meaning if the script doesnt give any errors, it must be an integer.
try doing: