command help
#4

Atleast guys, explain what the problem was. By pasting the code into his gamemode, he will never learn what it was wrong in case it happens again..

pawn Код:
format(string, sizeof string, "[SERVER] %d amount of Money has been Sent to %s", amount, giveplayerid);
format(string, sizeof string, "[SERVER] %d amount of Money has Sent by %s", amount, playerid);
What are you trying to display is the id of the player which is integer, not string.
pawn Код:
format(string, sizeof string, "[SERVER] %d amount of Money has been Sent to %d", amount, giveplayerid);
format(string, sizeof string, "[SERVER] %d amount of Money has Sent by %d", amount, playerid);
You can use the name/ID too, but you need to GetPlayerName first.
pawn Код:
new
    name[ MAX_PLAYER_NAME ],
    gname[ MAX_PLAYER_NAME ]
;

GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(giveplayerid, gname, sizeof(gname));

format(string, sizeof string, "[SERVER] %d amount of Money has been Sent to %s(%d)", amount, gname, giveplayerid);
format(string, sizeof string, "[SERVER] %d amount of Money has Sent by %s(%d)", amount, name, playerid);
Reply


Messages In This Thread
command help - by Michael_Cuellar - 19.12.2012, 07:04
Re: command help - by Marven - 19.12.2012, 08:38
Re: command help - by RedCrossER - 19.12.2012, 08:45
Re: command help - by Konstantinos - 19.12.2012, 09:18

Forum Jump:


Users browsing this thread: 1 Guest(s)