12.06.2011, 11:02
pawn Код:
command(noteplayer, playerid, params[])
{
new pid;
new note[128];
new string[128];
if( PlayerInfo[playerid][Admin] >= 1)
{
if(sscanf(params, "is[128]", pid, note)) //You forgot to add the "s" , and the [128] is the size
{
SendClientMessage(playerid, COLOUR_ORANGE, "Hint: /noteplayer (playerid) (note)");
return 1;
}
if(!IsPlayerConnected(pid))
{
SendClientMessage(playerid, COLOUR_ORANGE, "That player ID is not connected.");
return 1;
}
format(string, sizeof(string), "~r %s",note);
GameTextForPlayer(pid, string , 10000, 0); //You use the string we formatted for the text
}
return 1;
}