Stats command
#1

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)
Reply
#2

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
Reply
#3

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)