08.04.2012, 10:09
How i can make player info GUI dialog? Just /pinfo command, and there:
Код:
Money: Score: Health: Armour:
Money: Score: Health: Armour:
format(string, sizeof(string), "Player Score: %d | Player Money: %d | Player Health: %f | Player Armour: %f", scorevariable, moneyvariable, healthvariable, armourvariable);
ShowPlayerDialog(playerid, [DIALOGID], DIALOG_STYLE_MSGBOX, "*Player Information*", string, "Okay", "Close");
if (strcmp(cmdtext, "/pinfo", true) == 0) { format(string, sizeof(string), "Player Score: %d | Player Money: %d | Player Health: %f | Player Armour: %f", scorevariable, moneyvariable, healthvariable, armourvariable); ShowPlayerDialog(playerid, 8555, DIALOG_STYLE_MSGBOX, "*Player information*", string, "Okay", ""); return 1; }
error 017: undefined symbol "string" error 017: undefined symbol "string" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line Compilation aborted.
if (strcmp("/pinfo", cmdtext, true, 6) == 0) { new string[128]; format(string, sizeof(string), "Player Score: %d | Player Money: %d | Player Health: %f | Player Armour: %f", scorevariable, moneyvariable, healthvariable, armourvariable); ShowPlayerDialog(playerid, 8555, DIALOG_STYLE_MSGBOX, "*Player information*", string, "Okay", ""); return 1; }
if (strcmp("/pinfo", cmdtext, true, 6) == 0) { new string[128]; format(string, sizeof(string), "Player Score: %d | Player Money: %d | Player Health: %f | Player Armour: %f", GetPlayerScore(playerid), moneyvariable, healthvariable, armourvariable); ShowPlayerDialog(playerid, 8555, DIALOG_STYLE_MSGBOX, "*Player information*", string, "Okay", ""); return 1; }
if (strcmp("/pinfo", cmdtext, true, 6) == 0) { new string[128]; format(string, sizeof(string), "Player Score: %d | Player Money: %d | Player Health: %f | Player Armour: %f", GetPlayerScore(playerid),GetPlayerMoney(playerid), GetPlayerHealth(playerid), GetPlayerArmour(playerid)); ShowPlayerDialog(playerid, 8555, DIALOG_STYLE_MSGBOX, "*Player information*", string, "Okay", ""); return 1; }
if (strcmp("/pinfo", cmdtext, true, 6) == 0) { new string[128]; format(string, sizeof(string), "Player Score: %d | Player Money: %d | Player Health: %f | Player Armour: %f", GetPlayerScore(playerid),GetPlayerMoney(playerid), GetPlayerHealth(playerid), GetPlayerArmour(playerid)); ShowPlayerDialog(playerid, 8555, DIALOG_STYLE_MSGBOX, "*Player information*", string, "Okay", ""); return 1; }