server configuration
#7

OnPlayerConnect

Код:
public OnPlayerConnect(playerid)
{
	GetPlayerIp(playerid,p_IP[playerid],16);
    SetPlayerColor(playerid,_COLOR_GREY2);
	Sprache[playerid] = 1;
	DisplayHUD[playerid] = 1;
	duelEnemyID[playerid] = -1;
	duelInvited[playerid] = -1;
	duelID[playerid] = -1;
	lastpmid[playerid] = -1;
	new playercount;
	foreach(Player,i)
	{
	    if(i != playerid)
	    {
		    if(!strcmp(p_IP[playerid],p_IP[i],true)) playercount++;
		}
	}
	if(playercount >= 3)
	{
	    SendClientMessage(playerid,_COLOR_RED,"There are already people online with the same IP as yours!");
	    printf("%s [%d] was kicked from the server. [Same IP adress]",PlayerName(playerid),playerid);
	    DelayKick(playerid,10);
	}
	ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Sprache | Language | Lengua","Deutsch\nEnglish\nEspanol","Wдhlen","Select");

 	Attach3DTextLabelToPlayer(level[playerid], playerid, 0.0, 0.0, 0.80);
 	Attach3DTextLabelToPlayer(ClassLabel[playerid], playerid, 0.0, 0.0, 0.60);
	Attach3DTextLabelToPlayer(ProtectLabel[playerid], playerid, 0.0, 0.0, 1.0);
	Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 1.20);
	Attach3DTextLabelToPlayer(VipLabel[playerid], playerid, 0.0, 0.0, 1.40);

    GetPlayerName(playerid,NewspName,sizeof(NewspName));
	format(NewsStr[0],128,"%s ist dem Server beigetreten. ~r~[ Beitritt ]",NewspName);
	format(NewsStr[1],128,"%s has joined the server.  ~r~[ Join ]",NewspName);
	format(NewsStr[2],128,"%s se ha unido al servidor. ~r~[ Join ]",NewspName);
	SendNewsMessage(NewsStr[0],NewsStr[1],NewsStr[2]);
	InCP[playerid] = -1;
	ZoneID[playerid] = -1;
	disguised[playerid] = -1;
	SpawnPoint[playerid] = 999;
	realmoney[playerid] = 0;
	Rank[playerid] = 0;
	duelEnemyID[playerid] = -1;
	duelInvited[playerid] = -1;


	for(new skill; skill<11; skill++)
	{
    	SetPlayerSkillLevel(playerid, skill, 1000);
	}

	for(new base; base < sizeof(TeamNames); base++)
	{
    	GangZoneShowForPlayer(playerid, Base[base], ZoneColors[base]);
	}

	for(new zone; zone < sizeof(ZoneLocations); zone++)
	{
	    if(ZoneCaptured[zone] == -1) GangZoneShowForPlayer(playerid,GangZoneID[zone],0xFFFFFF22);
		if(ZoneCaptured[zone] >= 0) GangZoneShowForPlayer(playerid,GangZoneID[zone],ZoneColors[ZoneCaptured[zone]]);
	}

	for(new zone; zone < sizeof(ZoneNames); zone++) CaptureTimer[zone][playerid] = -1;
	new Float:x,Float:y,Float:z;
	GetPlayerPos(playerid,x,y,z);
	SetPVarFloat(playerid, "x", x);
	SetPVarFloat(playerid, "y", y);
	SetPVarFloat(playerid, "z", z);
	alreadyjoined[playerid] = 0;
	for(new i;i<sizeof(VehiclePositions);i++) fixedveh[i][playerid] = 0;
	RemoveBuildings(playerid);
	disabledchat[playerid] = 1;
	eventspawncounter[playerid] = 0;
	duelhealth[playerid] = 100;
	duelarmour[playerid] = 100;
	for(new i;i<10;i++) titles[playerid][i] = 0;
	shadowtitlekills[playerid] = 0;
	warchieftitlekills[playerid] = 0;
	bladestormtitlekills[playerid] = 0;
	sawbladetitlekills[playerid] = 0;
	silentassasintitlekills[playerid] = 0;
	coldbloodedtitlekills[playerid] = 0;
	explosivetitlekills[playerid] = 0;
	labelid[playerid] = -1;
	rpgspawned[playerid] = 0;
	KillTimer(RPGtimer[playerid]);
	sawnspawned[playerid] = 0;
	KillTimer(sawntimer[playerid]);
	deaglespawned[playerid] = 0;
	KillTimer(deagletimer[playerid]);
	specialpack[playerid] = 0;
	specialpackexpire[playerid] = 0;
	minigunammo[playerid] = -1;
	reportedid[playerid] = -1;
	pDrunkLevelLast[playerid] = -1;
	pFPS[playerid] = -1;
	RemovePickUps(playerid);
	DMSpawn[playerid] = 0;
	clanmesID[playerid] = 0;
	missioncheck[playerid] = 0;
	missiondone[playerid] = 0;
	for(new i; i < 4; i++)
	{
		textspam[playerid][i] = 0;
	}
	storerespawn[playerid] = 0;
	foreach(Player,i)
	{
	    ignored[i][playerid] = 0;
	    ignored[playerid][i] = 0;
	    voted[playerid][i] = 0;
	}
	bugged[playerid] = 0;
	lastwarned[playerid] = gettime() - 10;
	spawndata[playerid][p_world] = 0;
	spawndata[playerid][spawnkill_protection] = 0;
	for(new i; i < 13; i++)
	{
		spawndata[playerid][p_weapons][i] = 0;
		spawndata[playerid][p_ammo][i] = 0;
	}
	p_healtharmour[playerid][p_health] = 0.0;
	p_healtharmour[playerid][p_armour] = 0.0;
	foreach(Player,i) Anzeige(i);
	for(new i; i < sizeof(BriefCase); i++)
 	{
		SetPlayerMapIcon(playerid,i,briefcasepos[i][0],briefcasepos[i][1],briefcasepos[i][2],6,0,0);
	}
	for(new i; i < sizeof(TeamNames); i++)
	{
	    SetPlayerMapIcon(playerid,i+sizeof(BriefCase),FlagPosition[i][0],FlagPosition[i][1],FlagPosition[i][2],19,0,0);
	}
	for(new i = 0; i < 13; i++)
	{
	    PlayerWeapons[playerid][i] = 0;
	}
	GrantedJetpack[playerid] = false;
	jetpackcanuse[playerid] = 0;
	for(new i; i < 2; i++) nolaganticheat[playerid][i] = 0;
	vhmod_warned[playerid] = 0;
	BF[playerid] = 0;
	return 1;
}
Reply


Messages In This Thread
server configuration - by DetoNater - 04.11.2016, 15:08
Re: server configuration - by GoldenLion - 04.11.2016, 15:13
Re: server configuration - by DomagojSellug - 04.11.2016, 15:23
Re: server configuration - by RyderX - 04.11.2016, 15:26
Re: server configuration - by CXdur - 04.11.2016, 15:26
Respuesta: server configuration - by Eloy - 04.11.2016, 15:27
Re: server configuration - by DetoNater - 15.11.2016, 17:35

Forum Jump:


Users browsing this thread: 3 Guest(s)