[Help]On Spawn Commands -
bubka3 - 20.02.2009
Hello,
I have started to learn pawn. After using the Wiki and the premade script I have, i figured out this code:
Quote:
//Gteam 0
{
if(gTeam[playerid] != 0)
{
SetPlayerColor(playerid, 0xFFFFFFAA);
}
{
SendClientMessageToAll(COLOR_WHITE, "Welcome To Citzen: ");
}
}
|
But on "SendClientMessageToAll(COLOR_WHITE, "Welcome To Citzen:<name> ");" I need name to appear on it of the player. Can anyone help me on this?
Thanks,
Bubka3
Re: [Help]On Spawn Commands -
Hot - 20.02.2009
SendClientMessageToPlayer(COLOR_WHITE, "Welcome To Citzen");
I think... or just :
SendClientMessage(COLOR_WHITE, "Welcome To Citzen");
I use in my server SendClientMessageToPlayer(COLOR_WHITE, "Welcome To Citzen");
but the name I don't know ,
Re: [Help]On Spawn Commands -
bubka3 - 20.02.2009
That does work, i need the name of the person to appear where <name> is.
Re: [Help]On Spawn Commands -
Hot - 20.02.2009
why don't you use Join messages ?
Search on Wiki
Re: [Help]On Spawn Commands -
bubka3 - 20.02.2009
Yes i know it is there. But I cant customize the message for each team. With my code I can (if i can get the name to appear.)
Re: [Help]On Spawn Commands -
Hot - 20.02.2009
I get it from my server :
Код:
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Welcome Citzen %s .", pName);
SendClientMessageToAll(COLOR_WHITE, string);
SavePos[playerid][SavedPos] = 1;
use GetPlayerName(playerid, pName, sizeof(pName))
and then use (string, sizeof(string), "Welcome Citzen %s .", pName);
Re: [Help]On Spawn Commands -
bubka3 - 20.02.2009
So
Quote:
//Gteam 0
{
if(gTeam[playerid] != 0)
{
SetPlayerColor(playerid, 0xFFFFFFAA);
}
{
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Welcome Citzen %s .", pName);
SendClientMessageToAll(COLOR_WHITE, string);
}
}
|
Would Work?
Re: [Help]On Spawn Commands -
ICECOLDKILLAK8 - 20.02.2009
Do you want to send the message to just the Player or all Players?
Re: [Help]On Spawn Commands -
bubka3 - 20.02.2009
All pLayers
Re: [Help]On Spawn Commands -
Hot - 20.02.2009
bubka , I think youre doing right with
Код:
//Gteam 0
{
if(gTeam[playerid] != 0)
{
SetPlayerColor(playerid, 0xFFFFFFAA);
}
{
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Welcome Citzen %s .", pName);
SendClientMessageToAll(COLOR_WHITE, string);
}
}
Make a copy of your gamemode , chage it and test it .