SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Română/Romanian

Reply
 
Thread Tools Display Modes
Old 22/06/2014, 02:48 PM   #1
razvan20100
Banned
 
Join Date: Mar 2010
Location: Romania
Posts: 76
Reputation: 3
Default Lag Gamemode

Salut am si eu o problema in legatura cu gamemode-ul IBP Roleplay , adica am un bug idiot care creaza foarte mult lag pe server si am observat ca atunci cand se conecteaza cineva pe server ii seteaza level si ping 0 si atunci este lag , am verificat in onplayerconnect si nu vad nimic in neregula acolo. Alte sugestii ? Mai este si JoinCounters care nu stiu ce este .. nu sunt profesionist in script , doar incepator..


Code:
/* OnPlayerConnect

                    ___          _____         /  /\
                   /  /\        /  /::\       /  /::\
                  /  /:/       /  /:/\:\     /  /:/\:\
                 /__/::\      /  /:/~/::\   /  /:/~/:/
                 \__\/\:\__  /__/:/ /:/\:| /__/:/ /:/
                    \  \:\/\ \  \:\/:/~/:/ \  \:\/:/
                     \__\::/  \  \::/ /:/   \  \::/
                     /__/:/    \  \:\/:/     \  \:\
                     \__\/      \  \::/       \  \:\
                                 \__\/         \__\/
                                 ___           ___
                                /  /\         /  /\
                               /  /::\       /  /::\
                              /  /:/\:\     /  /:/\:\
                             /  /:/~/:/    /  /:/~/:/
                            /__/:/ /:/___ /__/:/ /:/
                            \  \:\/:::::/ \  \:\/:/
                             \  \::/~~~~   \  \::/
                              \  \:\        \  \:\
                               \  \:\        \  \:\
                                \__\/         \__\/							*/
public OnPlayerConnect(playerid)
{
	RemoveBuildingForPlayer(playerid, 732, 572.5625, -1256.9063, 16.7344, 0.25);
	//========================================================================== DMV NOU
	RemoveBuildingForPlayer(playerid, 1215, 1195.3594, -1820.2734, 13.1406, 0.25);
	//============================= Mall
	RemoveBuildingForPlayer(playerid, 6130, 1117.5859, -1490.0078, 32.7188, 0.25);
    RemoveBuildingForPlayer(playerid, 6255, 1117.5859, -1490.0078, 32.7188, 0.25);
	//========================================================================== Peco Sud
    RemoveBuildingForPlayer(playerid, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
	RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 0.25);
	RemoveBuildingForPlayer(playerid, 1226, 1955.6641, -1793.0938, 16.3906, 0.25);
	// Unity
	RemoveBuildingForPlayer(playerid, 1226, 1808.1250, -1859.5391, 16.3516, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1747.1875, -1846.7109, 10.8047, 0.25);
	//========================================================================== EMS NEW
	RemoveBuildingForPlayer(playerid, 5935, 1120.1563, -1303.4531, 18.5703, 0.25);
	RemoveBuildingForPlayer(playerid, 1440, 1085.7031, -1361.0234, 13.2656, 0.25);
	RemoveBuildingForPlayer(playerid, 1440, 1141.9844, -1346.1094, 13.2656, 0.25);
	RemoveBuildingForPlayer(playerid, 1440, 1148.6797, -1385.1875, 13.2656, 0.25);
	RemoveBuildingForPlayer(playerid, 5737, 1120.1563, -1303.4531, 18.5703, 0.25);
	//========================================================================== Primarie
    RemoveBuildingForPlayer(playerid, 4024, 1479.8672, -1790.3984, 56.0234, 0.25);
	RemoveBuildingForPlayer(playerid, 4044, 1481.1875, -1785.0703, 22.3828, 0.25);
	RemoveBuildingForPlayer(playerid, 4046, 1479.5234, -1852.6406, 24.5156, 0.25);
	RemoveBuildingForPlayer(playerid, 4047, 1531.6328, -1852.6406, 24.5156, 0.25);
	RemoveBuildingForPlayer(playerid, 4217, 1449.2500, -1852.5703, 22.3672, 0.25);
	RemoveBuildingForPlayer(playerid, 1266, 1482.0859, -1859.9688, 25.0391, 0.25);
	RemoveBuildingForPlayer(playerid, 4170, 1433.9531, -1844.4063, 21.4219, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1456.3984, -1832.5313, 11.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 1260, 1482.0859, -1859.9688, 25.0391, 0.25);
	RemoveBuildingForPlayer(playerid, 4004, 1479.5234, -1852.6406, 24.5156, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1504.8438, -1832.5313, 11.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1447.9063, -1748.2266, 12.9063, 0.25);
	RemoveBuildingForPlayer(playerid, 4002, 1479.8672, -1790.3984, 56.0234, 0.25);
	RemoveBuildingForPlayer(playerid, 3980, 1481.1875, -1785.0703, 22.3828, 0.25);
	RemoveBuildingForPlayer(playerid, 4003, 1481.0781, -1747.0313, 33.5234, 0.25);
	RemoveBuildingForPlayer(playerid, 620, 1516.0000, -1748.6016, 13.0078, 0.25);
	RemoveBuildingForPlayer(playerid, 4048, 1531.6328, -1852.6406, 24.5156, 0.25);
	//==========================================================================News
	RemoveBuildingForPlayer(playerid, 1215, 616.7656, -1495.7734, 14.3203, 0.25);
	RemoveBuildingForPlayer(playerid, 1215, 616.7656, -1492.0313, 14.3203, 0.25);
	RemoveBuildingForPlayer(playerid, 1215, 616.7656, -1488.4766, 14.3203, 0.25);
	//==========================================================================
	
	InitSlots(playerid);
    OnlinePlayers++;
    ResetPlayerVariables( playerid );
    SetPlayerColor(playerid,COLOR_WHITE);
   	Meter1[playerid] = TextDrawCreate(526.000000,408.000000,"I");
	Meter2[playerid] = TextDrawCreate(622.000000,421.000000," ");
	Meter3[playerid] = TextDrawCreate(529.000000,428.000000,"      Range");
	TextDrawUseBox(Meter2[playerid],1);
	TextDrawBoxColor(Meter2[playerid],0x000000ff);
	TextDrawTextSize(Meter2[playerid],524.000000,171.000000);
	TextDrawAlignment(Meter1[playerid],0);
	TextDrawAlignment(Meter2[playerid],0);
	TextDrawAlignment(Meter3[playerid],0);
	TextDrawFont(Meter1[playerid],2);
	TextDrawFont(Meter2[playerid],3);
	TextDrawFont(Meter3[playerid],2);
	TextDrawLetterSize(Meter1[playerid],0.199999,2.400000);
	TextDrawLetterSize(Meter2[playerid],2.199999,0.000000);
	TextDrawLetterSize(Meter3[playerid],0.300000,1.000000);
	TextDrawSetOutline(Meter1[playerid],1);
	TextDrawSetOutline(Meter2[playerid],1);
	TextDrawSetOutline(Meter3[playerid],1);
	TextDrawSetShadow(Meter1[playerid],0);
	TextDrawSetShadow(Meter2[playerid],0);
	TextDrawSetShadow(Meter3[playerid],0);
	// Her er infobox
	InfoBox[playerid] = TextDrawCreate(36.000000, 144.000000, "_");
	TextDrawUseBox(InfoBox[playerid],1);
	TextDrawBoxColor(InfoBox[playerid],0x00000033);
	TextDrawTextSize(InfoBox[playerid], 180.000000, 5.000000);
	TextDrawAlignment(InfoBox[playerid],0);
	TextDrawBackgroundColor(InfoBox[playerid],0x000000ff);
	TextDrawFont(InfoBox[playerid],2);
	TextDrawLetterSize(InfoBox[playerid], 0.250000, 1.099999);
	TextDrawColor(InfoBox[playerid], -1);
	TextDrawSetOutline(InfoBox[playerid],1);
	TextDrawSetProportional(InfoBox[playerid],1);
	TextDrawSetShadow(InfoBox[playerid],1);
	// Achievement box
	InfoBoxer[playerid] = TextDrawCreate(18.000000,428.000000,"test");
	TextDrawUseBox(InfoBoxer[playerid],1);
	TextDrawBoxColor(InfoBoxer[playerid],0x00000033);
	TextDrawTextSize(InfoBoxer[playerid],217.000000,59.000000);
	TextDrawAlignment(InfoBoxer[playerid],0);
	TextDrawBackgroundColor(InfoBoxer[playerid],0x000000ff);
	TextDrawFont(InfoBoxer[playerid],2);
	TextDrawLetterSize(InfoBoxer[playerid],0.199999,0.899999);
	TextDrawColor(InfoBoxer[playerid],0xffffffff);
	TextDrawSetOutline(InfoBoxer[playerid],1);
	TextDrawSetProportional(InfoBoxer[playerid],1);
	TextDrawSetShadow(InfoBoxer[playerid],1);
	RemovePlayerAttachedObject(playerid, 0);
	RemovePlayerAttachedObject(playerid, 1);
	RemovePlayerAttachedObject(playerid, 2);
	RemovePlayerAttachedObject(playerid, 3);
	RemovePlayerAttachedObject(playerid, 4);
	// Speedometer
	CarInfo[playerid] = TextDrawCreate(546.0000, 100.0000,"Viteza: 100~n~Combustibil: 100");
	TextDrawAlignment(CarInfo[playerid],0);
	TextDrawFont(CarInfo[playerid],1);
	TextDrawLetterSize(CarInfo[playerid],0.420000,1.300000);
	TextDrawColor(CarInfo[playerid],0xffffffff);
	TextDrawSetOutline(CarInfo[playerid],1);
	TextDrawSetShadow(CarInfo[playerid],1);
	// Snow
	if(SnowOn == 1) { SnowObject[playerid] = CreatePlayerObject(playerid, 18864, 0, 0, 0, 0, 0, 0); }
	//==========================================================================
	JoinCounter = JoinCounter + 1;
	dini_IntSet("RRP/Other/JoinCounter.cfg", "Connections", JoinCounter);
	//==========================================================================
	PlayerPressedJump[playerid] = 0;
	Wounded[playerid] = 0;
	PlayerInfo[playerid][pReport] = -1;
	PlayerInfo[playerid][pQuestion] = -1;
	PlayerInfo[playerid][pRadioHandle] = -1;
	SetPlayerScore(playerid, 0);
	UsingPayphone[playerid] = 0;
	IsUsingAnim[playerid] = 0;
	if (!IsValidName(playerid))
	{
	    SendClientMessage(playerid,COLOR_GRAD2,"Wrong name format. Please reconnect with a proper Role Play name.");
    	SendClientMessage(playerid,COLOR_GRAD2,"Example: John_Walker");
        Kick(playerid);
	    return 0;
	}
 	new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
	if(RPName(PlayerName(playerid),first,last))
	{
		InitPlayerConnection( playerid );
   		SetSpawnInfo( playerid, 0, PlayerInfo[playerid][pSkin], 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
	    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
	    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
	    SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
	    foreach (Player, i)
		{
		    if(BlockPMPerson[playerid][i] == 1)
		    {
		        BlockPMPerson[playerid][i] = 0;
		    }
		}
	}
	else
	{
		SendClientMessage(playerid,0xA9C4E4AA,"Invalid Name, Correct Format: Firstname_Lastname (Kicked)");
		Kick(playerid);
	}
	return 1;
}
razvan20100 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Brasil Drift Show [BDS] - Primeiro GameMode vitorzero3um Português/Portuguese 3 29/02/2012 07:48 PM
[ENG] Ideas for new GameMode [NL] Ideeen voor nieuwe Gamemode Xtreme-Nicole Everything and Nothing 10 10/07/2011 12:20 PM
[ENG] Ideas for new GameMode [NL] Ideeen voor nieuwe GameMode Xtreme-Nicole Help Archive 2 09/07/2011 12:24 PM


All times are GMT. The time now is 06:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.