strcat
#3

Quote:
Originally Posted by Nru
Посмотреть сообщение
Try this I'm sure it will work.

Код:
public OnPlayerConnect(playerid)
{
	new
		String[128],
		PlayerName[MAX_PLAYER_NAME];

	GetPlayerName(playerid, PlayerName, sizeof ( PlayerName ));

	format(String, sizeof ( String ), "{C3C3C3}GAME: %s has entered the server", PlayerName);

	SendClientMessageToAll(-1, String);

	new
		 String2[256];
	format(string2, sizeof(string2),"{FFCC00}Welcome to GTA Wargounds.\n");
	format(string2, sizeof(string2),"%s{FFCC00}If you need any help, don't hesitate to ask\n",string2);
	format(string2, sizeof(string2),"%s{C3C3C3}Here are some commands to get you started\n",string2);
	format(string2, sizeof(string2),"%s{C3C3C3}/cmds, /help, /rules\n",string2);


	SendClientMessage(playerid,-1,String2);

	GameTextForPlayer(playerid, "~w~GTA ~r~ WARGROUNDS", 5000, 6);

	return true;
}
PlayerName is an array, you need to define an index.


Код:
public OnPlayerConnect(playerid)
{
	new
		String[128],
		PlayerName[MAX_PLAYER_NAME];

	GetPlayerName(playerid, PlayerName[playerid], sizeof ( PlayerName[playerid] ));

	format(String, sizeof ( String ), "{C3C3C3}GAME: %s has entered the server", PlayerName[playerid]);

	SendClientMessageToAll(-1, String);

	new
		 String2[256];
	format(string2, sizeof(string2),"{FFCC00}Welcome to GTA Wargounds.\n");
	format(string2, sizeof(string2),"%s{FFCC00}If you need any help, don't hesitate to ask\n",string2);
	format(string2, sizeof(string2),"%s{C3C3C3}Here are some commands to get you started\n",string2);
	format(string2, sizeof(string2),"%s{C3C3C3}/cmds, /help, /rules\n",string2);


	SendClientMessage(playerid,-1,String2);

	GameTextForPlayer(playerid, "~w~GTA ~r~ WARGROUNDS", 5000, 6);

	return true;
}
Also if you want to keep using PlayerName in the rest of your script, you should make PlayerName a global variable.
Reply


Messages In This Thread
strcat - by ivndosos - 25.03.2018, 21:00
Re: strcat - by Nru - 25.03.2018, 21:06
Re: strcat - by Gforcez - 25.03.2018, 21:10
Re: strcat - by Jefff - 25.03.2018, 21:45
Re: strcat - by [WSF]ThA_Devil - 25.03.2018, 21:53

Forum Jump:


Users browsing this thread: 2 Guest(s)