26.08.2015, 10:37
I've got an question, as soon as you connect to my server you will receive an message with "Welcome"
But... I wanted to make it "Welcome %s", so It'd be "Welcome [players name]", I tried to do this.
but it gives me an warning namely;
and I know the warning is about the pName, in the GameTextForPlayer line, but how can I make it like I want?
PHP код:
public OnPlayerRequestSpawn(playerid)
{
GameTextForPlayer(playerid, "Welcome", 2500, 3);
return 1;
}
PHP код:
public OnPlayerRequestSpawn(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GameTextForPlayer(playerid, "Welcome %s", 2500, 3, pName);
return 1;
Quote:
warning 202: number of arguments does not match definition |