simple problem
#1

how to merge this code?

Код:
public OnPlayerConnect(playerid)
{
    tazerout[playerid] = 0; tazerin[playerid] = 0;
	return 1;
}
with
Код:
public OnPlayerConnect(playerid)
{
	{
	    LoadPlayerAnimLibs(playerid);
		RemoveBuildingForPlayer(playerid, 4239, 1407.9063, -1407.3984, 33.9844, 0.25);
		new playerip[32];
		GetPlayerIp(playerid,playerip,32);
		format(PlayerTemp[playerid][IP], 32, "%s", playerip);

		dini_IntSet(globalstats, "connects", dini_Int(globalstats,"connects")+1);

	    new nome[ MAX_STRING ], nome2[ MAX_STRING ];
		format( nome, sizeof(nome), "14[JOIN] %s[%d] has joined Tokyo Mafia Roleplay. (IP: %s) - Connects: %d | Online: %d",PlayerName(playerid), playerid, playerip, dini_Int(globalstats,"connects"), ConnectedPlayers());
		iEcho( nome );

		format(nome,sizeof(nome),"[JOIN] %s(%d) has joined Tokyo Mafia Roleplay",RPName(playerid),playerid);
		format(nome2,sizeof(nome2),"[JOIN] %s(%d) has joined Tokyo Mafia Roleplay (IP: %s)",RPName(playerid),playerid, playerip);
		PlayerLoop(i)
		{
			if(PlayerTemp[i][jqmessage])
			{
			    if(PlayerInfo[i][power]) SendClientMessage(i,COLOR_LIGHTGREY, nome2);
			    else SendClientMessage(i,COLOR_LIGHTGREY, nome);
			}
		}

		SetTimerEx("ConnectIRC", 200, false, "d", playerid);
		SetTimerEx("WelcomeMessage", 2000, 0, "ii", playerid, 0);

		TextDrawHideForPlayer(playerid, PlayerTemp[playerid][Status]);
		TextDrawHideForPlayer(playerid, PlayerTemp[playerid][LocationTD]);
	    TextDrawHideForPlayer(playerid, TextDraw__News);
	    TextDrawHideForPlayer(playerid, IMtxt);

		return 1;
	}


}
Reply
#2

I don't understand, exactly what do you want to do?
Reply
#3

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
I don't understand, exactly what do you want to do?
i want put tazer filterscript in my main gamemode

you can see i have 2x times
Код:
public OnPlayerConnect(playerid)
Reply
#4

Simply copy the code that is in "OnPlayerConnect" of the filterscript, and paste it in "OnPlayerConnect" of your Game Mode.
Reply
#5

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
Simply copy the code that is in "OnPlayerConnect" of the filterscript, and paste it in "OnPlayerConnect" of your Game Mode.
it give me Pawn error (225) Unreachable Code
Reply
#6

Let's see, it shows all the "OnPlayerConnect" callback of the Filterscript, and the game mode.
Reply
#7

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
Let's see, it shows all the "OnPlayerConnect" callback of the Filterscript, and the game mode.
Fixed, ty anyway.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)