whys this not saying the players name.
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

wooooowwowowo ///


how i incorporate it into my /credits
Reply
#5

Create a string? Format the string? Send the string in the text?
Reply
#6

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?
Reply
#7

Quote:
Originally Posted by PillPopinAnimal
wait mate.. whats a string. and how do i get one?
I think you should start here first.
Reply
#8

pawn Код:
new sstring[enter a string size];
  format(sstring, sizeof(sstring),"text to send",put the string shit in here);
  SendClientMessage(playerid,colour,sstring);

Reply
#9

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 =]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)