SA-MP Forums Archive
Stats command - 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: Stats command (/showthread.php?tid=391188)



Stats command - Zachlive - 09.11.2012

Hello, I tried creating a simple stats command, but I am getting an error.
here is the command-...

pawn Код:
CMD:stats(playerid,params[])
{
    new string2[200];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string2,sizeof(string2),"Name: %s \nKills: %d\nDeaths: %d",name,PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths]);
    SendClientMessage(playerid, COL_RED);
    return 1;
}
Here is the error
pawn Код:
error 035: argument type mismatch (argument 2)



Re: Stats command - Glad2BeHere - 09.11.2012

pawn Код:
format(string2,sizeof(string2),"Name: %s Kills: %d Deaths: %d",name,PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths]);
if u want a new line u must format another string


Re: Stats command - YoYo123 - 09.11.2012

pawn Код:
SendClientMessage(playerid, COL_RED, string);



Re: Stats command - Zachlive - 09.11.2012

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
format(string2,sizeof(string2),"Name: %s Kills: %d Deaths: %d",name,PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths]);
if u want a new line u must format another string
I don't I just want that one line for a test.
but its not working