14.02.2013, 21:47
Hello everyone, I want to make a stats command for player to do /stats and see his own stats (only: name, cash, kills, deaths, and ratio. I'm using zcmd, and y_ini register/login system, pls can anyone make one for me cauz im trying but it doesn't work..
till now i got:
but doesn't work :S
It only gives me this:
till now i got:
pawn Код:
YCMD:stats(playerid, params[], help)
{
if(IsPlayerConnected(playerid))
{
new Cash = PlayerInfo[playerid][pCash];
new Kills = PlayerInfo[playerid][pKills];
new Deaths = PlayerInfo[playerid][pDeaths];
new string1[128],stats[1024];
format(string1, sizeof string1, "{44A1D0}Cash: {FFFFFF}[$%d] {44A1D0}Kills: {FFFFFF}[$%d] {44A1D0}Deaths: {FFFFFF}[$%d]", );
format(stats, sizeof stats, "%s", string1);
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Your account:",stats,"Ok","");
}
return 1;
}
It only gives me this:
Код:
C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1297) : error 029: invalid expression, assumed zero C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1297) : error 001: expected token: ",", but found ";" C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1295) : warning 204: symbol is assigned a value that is never used: "Deaths" C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1294) : warning 204: symbol is assigned a value that is never used: "Kills" C:\Users\user7\Desktop\Server\gamemodes\new.pwn(1293) : warning 204: symbol is assigned a value that is never used: "Cash"