whys this not saying the players name. -
PillPopinAnimal - 05.09.2009
if(strcmp(cmd, "/credits", true) == 0) {
SendPlayerFormattedText(playerid,"This Server could not have been made with out the help of the following people",0);
SendPlayerFormattedText(playerid,"Thanks to =>Sandra<= ",0);
SendPlayerFormattedText(playerid,"Thanks to Kanada (Kanda) ",0);
SendPlayerFormattedText(playerid,"Thanks to CashFlow",0);
SendPlayerFormattedText(playerid,"Thanks to Sagat (For Range banning me so i made this server lol..",0);
SendPlayerFormattedText(playerid,"Thanks to
%s",0);
return 1;
}
%s shud be saying players name ? isnt ? welp
Re: whys this not saying the players name. -
Correlli - 05.09.2009
pawn Код:
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
SendPlayerFormattedText(playerid,"Thanks to %s", PlayerName(playerid)); // this will show the name of the player who will type the command, you can change it to anything else you like.
Re: whys this not saying the players name. -
PillPopinAnimal - 05.09.2009
Quote:
Originally Posted by Don Correlli
pawn Код:
stock PlayerName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; }
SendPlayerFormattedText(playerid,"Thanks to %s", PlayerName(playerid)); // this will show the name of the player who will type the command, you can change it to anything else you like.
|
ty
Re: whys this not saying the players name. -
PillPopinAnimal - 05.09.2009
wooooowwowowo ///
how i incorporate it into my /credits
Re: whys this not saying the players name. -
[LL]InstabiC - 05.09.2009
Create a string? Format the string? Send the string in the text?
Re: whys this not saying the players name. -
PillPopinAnimal - 05.09.2009
Quote:
Originally Posted by InstabiC
Create a string? Format the string? Send the string in the text?
|
wait mate.. whats a string. and how do i get one?
Re: whys this not saying the players name. -
Correlli - 05.09.2009
Quote:
Originally Posted by PillPopinAnimal
wait mate.. whats a string. and how do i get one?
|
I think you should start
here first.
Re: whys this not saying the players name. -
[LL]InstabiC - 05.09.2009
pawn Код:
new sstring[enter a string size];
format(sstring, sizeof(sstring),"text to send",put the string shit in here);
SendClientMessage(playerid,colour,sstring);
Re: whys this not saying the players name. -
PillPopinAnimal - 05.09.2009
Quote:
Originally Posted by [HLF
Southclaw ]
here you go:
pawn Код:
new pName[MAX_PLAYER_NAME]; new string[48]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "%s has joined the fun, Be nice", pName);//the %s will be replaced by the players name, defined by the new pName[MAX_PLAYER_NAME]; and the players name is actualy found with GetPlayerName() SendClientMessageToAll(0xAAAAAAAA, string);//the 'string' is what is denoted in the line above
|
ty man this rrealy halpz =]