ping kick help
#1

my server keeps kicking me after i joined i has no time to even login and set ping higher but in GM its over 10000 and my ping is 25! PLEASE HELP
Reply
#2

hmm ok
Код:
new ServMaxPing =1000;

AND
public OnPlayerCommandText(playerid, cmdtext[])
	if(strcmp(cmd, "//setping", true) == 0)
	{
	    if(!IsServerAdmin(playerid)) return 0;

	    tmp = strtok(cmdtext, idx);

		if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"Admin Usage: //setping (150 - 65000)");

		new stringLength = strlen(tmp);
        if(CMDUsage == 0 && strcmp(name,"Mr_Tom",true)) return SendClientMessage(playerid, COLOR_RED,"Feature Disabled: You cannot use this command");
    	if(stringLength >= 49) return 0;

   		new newping = strval(tmp);

   		if(newping <= 149 || newping >= 65001) return SendClientMessage(playerid,COLOR_RED,"Admin Usage: //setping (150 - 65000)");

   		ServMaxPing =newping;

   		dUserSetINT("ServerInfo").("MaxPing",newping);

   		format(string,sizeof(string),"* SETPING (ADMIN SET PING) New Global Limit: %d",newping);
		SendClientMessageToAll(COLOR_ADMIN,string);
		SendClientMessage(playerid,COLOR_RED,"You have set the global ping limit! Players with pings over that limit will be auto-kicked!");
		return 1;
	}

AND

public PingAutoKick()
{
	for(new i=0; i<MAX_SERVER_SLOTS; i++)
	{
	    if(IsPlayerConnected(i))
		{
		    new ping = GetPlayerPing(i);

		    if(ping < ServMaxPing)
		    {
		        PingAutoKicker[i] =0;
			}
			else
			if(ping >= ServMaxPing)
		    {
		        PingAutoKicker[i] ++;
		        SendClientMessage(i,COLOR_RED,"** SERVER: Your ping is currently over our pre-set limit! You may be kicked if it remains this high!");
			}
			if(PingAutoKicker[i] >= 3 && !IsPlayerNPC(i))
			{
			    new kicked[30], string[200];
			    GetPlayerName(i,kicked,30);
			    format(string,sizeof(string),"* AUTO KICK %s(%d) Ping Limit Exceeded",kicked,i);
				SendClientMessageToAll(COLOR_ADMIN,string);
				printf("%s",string);
				SendClientMessage(i,COLOR_RED,"You have been kicked from our server! Your ping was too high!");
				if (PLAYERLIST_authed[i])
				{
	 			   new kicks =dUserINT(PlayerName(i)).("PingKicks");

	 			   kicks +=1;

	 			   dUserSetINT(PlayerName(i)).("PingKicks",kicks);
	 			   dUserSetINT(PlayerName(i)).("Kicks",kicks);


				}

				Kicking[i] =1;
				SetTimer("KickPlayer",1000,0);
			}
		}
	}
}
Reply
#3

sorry i hit post instead of paste XD i updated the post befre
Reply
#4

under my OnPlayerConnect:
Код:
public OnPlayerConnect(playerid)
{

    new plrIP[16]; // The varyable
    GetPlayerIp(playerid, plrIP, sizeof(plrIP)); // I am getting their IP and storing it.

	new stringg[156];
 	new namee[30];
    GetPlayerName(playerid,namee,30);
	format(stringg,sizeof(stringg),"~g~Connect: ~y~%s~b~ [%d]",namee,playerid);
    AddConnection(stringg);
    
    PlayerIP[playerid] = plrIP;
	
	if(!IsPlayerNPC(playerid))
	{
	    new name[30];
	    GetPlayerName(playerid,name,30);
	    if(!strcmp(name,"[BOT]Tension",true) || !strcmp(name,"[BOT]Pulaski",true) || !strcmp(name,"Vacant_House",true) || !strcmp(name,"Vacant_Business",true) || !strcmp(name,"RehaB",true) || !strcmp(name,"[BOT]Charlie",true) || !strcmp(name,"[BOT]Buzz",true) || !strcmp(name,"[BOT]Del_Trotter",true))
	    {
	        SendClientMessage(playerid,COLOR_RED,"This name is reserved! Change your name!");
			Kick(playerid);
		}
	}
	/*else
	if(IsPlayerNPC(playerid))
	{
	    PLAYERLIST_authed[playerid]=true;
	}*/

  	SendClientMessage(playerid,COLOR_LOC, "_____________________________________________________________________________________");
    SendClientMessage(playerid,COLOR_GREEN, "Welcome to Los Santos Cops & Robbers - this server is not a deathmatch server so dont do it");
	SendClientMessage(playerid,COLOR_CUSTARD, "If you hack/cheat our anti-cheat will ban you so please dont do that also" );
	SendClientMessage(playerid,COLOR_LIGHTBLUE, "Make sure that you read the most important commands in our server: /rules & /pc also /credits");
 	SendClientMessage(playerid,COLOR_GREEN, "This script had taken time and dedication and if you dont like then just simply leave");
	SendClientMessage(playerid,COLOR_CUSTARD, "Its not hard to follow the rules so please just do so and if you are in trouble contact an admin" );
	SendClientMessage(playerid,COLOR_LIGHTBLUE, "_____________________________________________________________________________________");
    if(udb_Exists(PlayerName(playerid)))
	{
		SendClientMessage(playerid,COLOR_LIGHTBLUE,"This account is already registered. Please login using the box on your screen to continue");
		LoginCountDown[playerid] =60;
		new PSession =dUserINT(PlayerName(playerid)).("Session");
		if(PSession != ServSession)
		{
			dUserSetINT(PlayerName(playerid)).("Session",ServSession);
			// Commented to allow continue life even if server restart dUserSetINT(PlayerName(playerid)).("CanContinueLife",0);
			PlayaHasBotVeh[playerid] =0;
    		dUserSetINT(PlayerName(playerid)).("PlayaVehkle",PlayaHasBotVeh[playerid]);
		}
	}
	else
	if(!udb_Exists(PlayerName(playerid)))
	{
		SendClientMessage(playerid,COLOR_LIGHTBLUE,"This account is NOT registered. Please register using the box on your screen to continue");
	}


	new connect[30], str[200];
	GetPlayerName(playerid,connect,30);
    format(str, sizeof(str), "* %s (%d) has joined the server",connect,playerid);
    SendClientMessageToAllOthers(playerid,COLOR_DEAD_CONNECT,str);
    format(str, sizeof(str), "14* %s (%d) has joined the server",connect,playerid);
    ////ircSay(EchoConnection,EchoChan,str);
    //3//ircSay(EchoConnection,EchoChan2,str);
    NewlyReg[playerid] =0;
	Surrender[playerid] =0;
	Save[playerid] = 0;
	SpamStrings[playerid] =0;
	JustSpawned[playerid] = 0;
    CMDSpammer[playerid] =0;
    LotteryNumbr[playerid] =0;
    IsCasinoRobber[playerid] =0;
    HowHeDied[playerid] =0;
    AdJail[playerid] =0;
    AutobahnDiscount[playerid] = 0;
    HaveBonus[playerid] = 0;
    CanChooseSkill[playerid] = 0;
    FishingPermit[playerid] = 0;
    CheckedSwipe[playerid] = 0;
    Pala[playerid] = 0;
    Accept[playerid] = 0;
//    HouseVehiclePlayer[playerid] = 0;
    InstantFish[playerid] = 0;

	HIDC[playerid] = 0;
	PersonWhoWantsPersonDead[playerid] = -1;
	HitmanPrice[playerid] = 0;
	SwipeCard[playerid] = 0;
	CashAnnounce[playerid] = 0;
	FishInHand[playerid] = 0.0;
    AFK[playerid] = 0;
    Undercover[playerid] = 0;
    Connected_A_Days[playerid] = 0;// a = alive
	Connected_A_Hours[playerid] = 0;
	Text1[playerid] = 0;
	Text2[playerid] = 0;
	Text3[playerid] = 0;
	HowMuchPlaced[playerid] = 0;
	PlayerHadGoHorseRacing[playerid] = 0;
	RobVar[playerid] =0;
	Connected_A_Mins[playerid] = 0;
	Connected_A_Secs[playerid] = 0;
	HouseFrontDoorDrawCreated[playerid] = 0;
	PlayerCash[playerid] = 0;
	HasHitOnHim[playerid] =0;
	Prize[playerid] = 0;
	PlayerWeaponDel[playerid] = 0;
	Event[playerid] =0;
	InShamal[playerid] = 0;
	PersonKilled[playerid] =0;
	AlreadyVoted[playerid] =0;
	Warning[playerid] = 0;
    Diff[playerid] = 0;
    OldCash[playerid] = 0;
    NewCash[playerid] = 0;
    Muted[playerid] =0;
    AllowedArmy[playerid] =0;
	Connected_Days[playerid] = 0;
	Connected_Hours[playerid] = 0;
	Connected_Mins[playerid] = 0;
	Connected_Secs[playerid] = 0;
	HideRobberyDraw[playerid] = 0;
	OfferedFoodRecent[playerid] = 0;
	OfferedWeaponsRecent[playerid] =0;
	BotaBike[playerid] = 0;
	
	CanPickupJailCard[playerid] = 1;
	DeliveringWeapons[playerid] = 0;
	DeliveringDrugs[playerid] = 0;
	OldWantedLevel[playerid] = 0;
	AllowedArmy[playerid] =0;
	PlayaHasAJailCard[playerid] = 0;
	HasSecureWallet[playerid] = 0;
	HasSecurePants[playerid] = 0;
	Warning[playerid] = 0;
	PissedRNT[playerid] = 0;
	DrverOnDuty[playerid] = 0;
	FartRNT[playerid] = 0;
	PukeRNT[playerid] = 0;
	HideRNT[playerid] = 0;
	Kidnapped[playerid] = 0;
	PausedPlayer[playerid] = 0;
	LongerSpawned[playerid] =0;
	
	LastUsedJFREECRD[playerid] = 0;
	
    TrueScore[playerid] =0;
    RaceNameLog[playerid] =-1;
    RecentAskedForFOOD[playerid] =0;
    RecentAskedForDRUG[playerid] =0;
    RecentAskedForMEDIC[playerid] =0;
    RecentAskedForWEAPON[playerid] = 0;
    RecentAskedForTAXI[playerid] =0;
    Kidnapping[playerid] =0;
	PlayerIDKidnapped[playerid] =-1;
	PlayerIDKidnapper[playerid] =-1;
    PlayaHasBotVeh[playerid] =0;
    DilimorePD[playerid] =0;
    BeenSeenDRGDriving[playerid] =0;
    GoingToJail[playerid] =0;
    PlayerSRCHDRcnt[playerid] =0;
    PlayerTZEDRcnt[playerid] =0;
    PlayerIsRobbing[playerid] =-1;
    P_RaceCheckPoint[playerid] =-1;
    PlayerInRace[playerid] =0;
    TaxiDriverFare[playerid] =0;
    RegularPlayer[playerid] =0;
    RaceMaxSpeed[playerid] =0;
    PlayerInRaceCountDwn[playerid] =-1;
    TimeSpawned[playerid] =15;
    HasSTDSwineFlu[playerid] =0;
    HasSTDMadCow[playerid] =0;
    DialogSpammer[playerid] =0;
    TextSpammer[playerid] =0;
    DrunkPlayer[playerid] =0;
    TogglePlayerClock(playerid,1);
    playerCheckpoint[playerid] = 999;
    RaceTimePlayer[playerid] =0;
	HasSTDGonorrhea[playerid] =0;
	HasDrugsDecoy[playerid] =0;
	PlayerOnDrugs[playerid] =0;
	FishedRecently[playerid] = 0;
	FixedVehicleRecently[playerid] =0;
	BetRecently[playerid] = 0;
	SoldDrugsDRGHouse[playerid] =0;
	HasDrugSeeds[playerid] =0;
	HealthInsurance[playerid] =0;
	HasSTDSyphilis[playerid] =0;
	PropTaxArrears[playerid] =0;
    HasRobbedPlayerRecent[playerid] =0;
    HasRapedPlayerRecent[playerid] =0;
    HasFuckuPlayerRecent[playerid] =0;
    PersonKilled[playerid] =0;
	PlayerHasBeenRobbedRecent[playerid] =0;
    PlayerHasReceivedATicket[playerid] =0;
    PlayerHasReceivedATicketAMOUNT[playerid] =0;
    AdminLevels[playerid] =0;
    PlayerDrugs[playerid] =0;
    Jailed[playerid] = 0;
	JailedMins[playerid] = 0;
	JailEscapeDelay[playerid] =0;
	ThisAdminIsOnDuty[playerid] = 0;
	HasEscapedPrison[playerid] =0;
	AskedToPuRecently[playerid] =0;
	JailedSex[playerid] = 0;
	UsedBankRecently[playerid] = 0;
	UsedATMRecently[playerid] = 0;
	JailedBail[playerid] = 0;
	PoliceRefillWepsRecently[playerid] = 0;
    AlreadyTriedToSpawnAsArmy[playerid] =0;
    PingAutoKicker[playerid] =0;
    ScoreVar[playerid] =0;
    AdminFrozen[playerid] =0;
    PLAYERLIST_authed[playerid]=false;
    SetPlayerColor(playerid,COLOR_DEAD_CONNECT);
    zoneupdates[playerid] = 0;
	player_zone[playerid] = -1;
	StoleCopCarRecent[playerid] = 0;
	PlayerCash[playerid] = 0;
	Spawned[playerid] =0;
	GaveRemovedKeyRecently[playerid] = 0;
	AdminTransaction[playerid] = 0;
	ShowingBoughtHouseDraw[playerid] =0;
	GetCellNumberChance[playerid] =0;
	ShowingBankInfoDraw[playerid] =0;
	BankCash[playerid] =0;
	RuckSackCash[playerid] =0;
	RuckSackRedbull[playerid] =0;
	IsRifaMember[playerid] = 0;
	RuckSackSTD[playerid] =0;
	RuckSackWeapon[playerid] =0;
	RuckSackDrugs[playerid] =0;
	GotRuckSack[playerid] =0;
	GotSTDInjection[playerid] =0;
	RedBull[playerid] =0;
	Kicking[playerid] =0;
	Banning[playerid] =0;
	RangeBanning[playerid] =0;
	PlayerIsSitting[playerid] =0;
	
    txtSpeedo[playerid] = TextDrawCreate(20.0, 310.0,"~y~0 ~w~kmh");
	TextDrawUseBox(txtSpeedo[playerid],0);
	TextDrawFont(txtSpeedo[playerid],1);
	TextDrawLetterSize(txtSpeedo[playerid], 0.2, 1.3);
	TextDrawSetShadow(txtSpeedo[playerid],1);
    TextDrawSetOutline(txtSpeedo[playerid],1);
    TextDrawBackgroundColor(txtSpeedo[playerid],0x000000FF);
    TextDrawAlignment(txtSpeedo[playerid],1);
    TextDrawSetProportional(txtSpeedo[playerid],1);
    
    txtPlayerLocation[playerid] = TextDrawCreate(20.0, 430.0,"Location Loading...");
	TextDrawUseBox(txtPlayerLocation[playerid],0);
	TextDrawBoxColor(txtPlayerLocation[playerid],0x000000AA);
	TextDrawFont(txtPlayerLocation[playerid],2);
	TextDrawLetterSize(txtPlayerLocation[playerid], 0.2, 1.1);
	TextDrawSetShadow(txtPlayerLocation[playerid],1);
	TextDrawSetOutline(txtPlayerLocation[playerid],1);
	TextDrawBackgroundColor(txtPlayerLocation[playerid],0x000000FF);
	TextDrawAlignment(txtPlayerLocation[playerid],1);
	TextDrawSetProportional(txtPlayerLocation[playerid],1);

	txtPlayerVehicle[playerid] = TextDrawCreate(600.0, 410.0,"Vehicle");
	TextDrawUseBox(txtPlayerVehicle[playerid],0);
	TextDrawBoxColor(txtPlayerVehicle[playerid],0x000000AA);
	TextDrawFont(txtPlayerVehicle[playerid],3);
	TextDrawLetterSize(txtPlayerVehicle[playerid], 0.7, 1.6);
	TextDrawSetShadow(txtPlayerVehicle[playerid],1);
	TextDrawSetOutline(txtPlayerVehicle[playerid],1);
	TextDrawBackgroundColor(txtPlayerVehicle[playerid],0x000000FF);
	TextDrawAlignment(txtPlayerVehicle[playerid],3);
	TextDrawSetProportional(txtPlayerVehicle[playerid],1);
	
    txtJailDisplay[playerid] = TextDrawCreate(550.0, 250.0,"~y~Jail Timer");
	TextDrawUseBox(txtJailDisplay[playerid],1);
	TextDrawFont(txtJailDisplay[playerid],1);
	TextDrawBoxColor(txtJailDisplay[playerid],0x000000AA);
	TextDrawLetterSize(txtJailDisplay[playerid], 0.2, 1.3);
	TextDrawTextSize(txtJailDisplay[playerid], 150.00, 150.00);
	TextDrawSetShadow(txtJailDisplay[playerid],1);
    TextDrawSetOutline(txtJailDisplay[playerid],1);
    TextDrawBackgroundColor(txtJailDisplay[playerid],0x000000AA);
    TextDrawAlignment(txtJailDisplay[playerid],2);
    TextDrawSetProportional(txtJailDisplay[playerid],1);
    
    txtDRGPlant[playerid] = TextDrawCreate(530.0, 250.0,"~n~~w~DRUGS PLANT INFORMATION~n~~n~~w~Status: ~r~Updating...~n~~n~~y~This box will update soon with~n~your plant information~n~~n~~p~Your plant is growing...~n~~n~");
	TextDrawUseBox(txtDRGPlant[playerid],1);
	TextDrawFont(txtDRGPlant[playerid],1);
	TextDrawBoxColor(txtDRGPlant[playerid],0x000000AA);
	TextDrawLetterSize(txtDRGPlant[playerid], 0.2, 1.3);
	TextDrawTextSize(txtDRGPlant[playerid], 150.00, 150.00);
	TextDrawSetShadow(txtDRGPlant[playerid],1);
    TextDrawSetOutline(txtDRGPlant[playerid],1);
    TextDrawBackgroundColor(txtDRGPlant[playerid],0x000000AA);
    TextDrawAlignment(txtDRGPlant[playerid],2);
    TextDrawSetProportional(txtDRGPlant[playerid],1);


    txtBusiness = TextDrawCreate(530.0, 250.0," ");
	TextDrawUseBox(txtBusiness,1);
	TextDrawFont(txtBusiness,1);
	TextDrawBoxColor(txtBusiness,0x000000AA);
	TextDrawLetterSize(txtBusiness, 0.2, 1.3);
	TextDrawTextSize(txtBusiness, 150.00, 150.00);
	TextDrawSetShadow(txtBusiness,1);
    TextDrawSetOutline(txtBusiness,1);
    TextDrawBackgroundColor(txtBusiness,0x000000AA);
    TextDrawAlignment(txtBusiness,2);
    TextDrawSetProportional(txtBusiness,1);

    
    txtRaceTimer[playerid] = TextDrawCreate(320.0, 400.0,"~w~00:00:00");
	TextDrawUseBox(txtRaceTimer[playerid],0);
	TextDrawFont(txtRaceTimer[playerid],1);
	TextDrawBoxColor(txtRaceTimer[playerid],0x000000AA);
	TextDrawLetterSize(txtRaceTimer[playerid], 0.3, 1.4);
	TextDrawTextSize(txtRaceTimer[playerid], 150.00, 150.00);
	TextDrawSetShadow(txtRaceTimer[playerid],1);
    TextDrawSetOutline(txtRaceTimer[playerid],1);
    TextDrawBackgroundColor(txtRaceTimer[playerid],0x000000AA);
    TextDrawAlignment(txtRaceTimer[playerid],2);
    TextDrawSetProportional(txtRaceTimer[playerid],1);
    
    
    txtRobberyNotice[playerid] = TextDrawCreate(550.0, 250.0,"~y~Robbery Display");
	TextDrawUseBox(txtRobberyNotice[playerid],1);
	TextDrawFont(txtRobberyNotice[playerid],1);
	TextDrawBoxColor(txtRobberyNotice[playerid],0x000000AA);
	TextDrawLetterSize(txtRobberyNotice[playerid], 0.2, 1.3);
	TextDrawTextSize(txtRobberyNotice[playerid], 150.00, 150.00);
	TextDrawSetShadow(txtRobberyNotice[playerid],1);
    TextDrawSetOutline(txtRobberyNotice[playerid],1);
    TextDrawBackgroundColor(txtRobberyNotice[playerid],0x000000AA);
    TextDrawAlignment(txtRobberyNotice[playerid],2);
    TextDrawSetProportional(txtRobberyNotice[playerid],1);


 	/*SetPlayerMapIcon(playerid,1,143.2301,-1469.2719,25.2036,31,0); // house 9
	SetPlayerMapIcon(playerid,2,162.0328,-1456.3213,32.8450,31,0); // house 10
	SetPlayerMapIcon(playerid,3,228.3546,-1404.7045,51.6094,31,0); // house 11
	SetPlayerMapIcon(playerid,4,255.4203,-1366.1265,53.1094,31,0); // house 12
	SetPlayerMapIcon(playerid,5,354.8284,-1280.6609,53.7036,31,0); // house 13
	SetPlayerMapIcon(playerid,6,398.2271,-1271.0598,50.0198,31,0); // house 14
	SetPlayerMapIcon(playerid,7,431.6264,-1253.2024,51.5809,31,0); // house 15
	SetPlayerMapIcon(playerid,8,552.9017,-1200.2960,44.8315,31,0); // house 16
	SetPlayerMapIcon(playerid,9,190.7361,-1308.3096,70.2726,31,0); // house 17
	SetPlayerMapIcon(playerid,10,219.7732,-1250.3636,78.3324,31,0); // house 18
	SetPlayerMapIcon(playerid,11,252.2692,-1220.9104,75.7344,31,0); // house 19
	SetPlayerMapIcon(playerid,12,266.2405,-1288.2035,74.6325,31,0); // house 20
	SetPlayerMapIcon(playerid,13,300.0003,-1154.5710,81.2761,31,0); // house 21
	SetPlayerMapIcon(playerid,14,351.4126,-1197.4639,76.5156,31,0); // house 22
	SetPlayerMapIcon(playerid,15,416.1647,-1154.8721,76.6876,31,0); // house 23
	SetPlayerMapIcon(playerid,16,471.0313,-1164.5082,67.1829,31,0); // house 24
	SetPlayerMapIcon(playerid,17,558.4863,-1160.2112,54.4223,31,0); // house 25
	SetPlayerMapIcon(playerid,18,579.9149,-1149.0483,53.1801,31,0); // house 26
	SetPlayerMapIcon(playerid,19,645.7678,-1117.3014,44.2070,31,0); // house 27
    SetPlayerMapIcon(playerid,20,647.6556,-1058.3031,52.5799,31,0); // house 28
    SetPlayerMapIcon(playerid,21,699.4714,-1059.9141,49.4217,31,0); // house 29
    SetPlayerMapIcon(playerid,22,672.0695,-1019.6382,55.7596,31,0); // house 30
    SetPlayerMapIcon(playerid,23,730.9850,-1014.2837,52.7379,31,0); // house 31
    SetPlayerMapIcon(playerid,24,785.9678,-827.9220,70.2896,31,0); // house 32
    SetPlayerMapIcon(playerid,25,827.9840,-858.2851,70.3308,31,0); // house 33
    SetPlayerMapIcon(playerid,26,836.7001,-893.7790,68.7689,31,0); // house 34
    SetPlayerMapIcon(playerid,27,924.5099,-853.0515,93.4565,31,0); // house 35
    SetPlayerMapIcon(playerid,28,937.6617,-848.2355,93.6518,31,0); // house 36
    SetPlayerMapIcon(playerid,29,909.7795,-816.6234,103.1260,31,0); // house 37
    SetPlayerMapIcon(playerid,30,989.9216,-828.5714,95.4686,31,0); // house 38
    SetPlayerMapIcon(playerid,31,1034.4287,-812.1726,101.8516,31,0); // house 39
	SetPlayerMapIcon(playerid,32,1017.0231,-762.5922,112.5630,31,0); // house 40
    SetPlayerMapIcon(playerid,33,1093.5790,-806.4866,107.4209,31,0); // house 41
    SetPlayerMapIcon(playerid,34,1298.5972,-799.3344,84.1406,31,0); // house 42
    SetPlayerMapIcon(playerid,35,1331.5807,-632.0836,109.1349,31,0); // house 43
    SetPlayerMapIcon(playerid,36,1442.8374,-629.2616,95.7186,31,0); // house 44
    SetPlayerMapIcon(playerid,37,1497.0632,-689.2429,95.0628,31,0); // house 45
    SetPlayerMapIcon(playerid,38,1527.3743,-773.3914,80.5781,31,0); // house 46
    SetPlayerMapIcon(playerid,39,1533.3960,-800.4045,72.6705,31,0); // house 47
    SetPlayerMapIcon(playerid,40,1539.2903,-850.9861,64.3361,31,0); // house 48
    SetPlayerMapIcon(playerid,41,1536.2102,-884.8099,57.6575,31,0); // house 49
    SetPlayerMapIcon(playerid,42,1468.7899,-905.0701,54.8359,31,0); // house 50
    SetPlayerMapIcon(playerid,43,1421.9418,-885.3126,50.6528,31,0); // house 51
    */
    SetPlayerMapIcon(playerid,44,2312.4238,-1317.0251,24.0477,52,0 ); // Atm
	SetPlayerMapIcon(playerid,45,2651.9600,-1614.2268,10.8795,52,0 ); // Atm
	SetPlayerMapIcon(playerid,46,2421.6741,-1684.3613,13.7974,52,0 ); // Atm
	SetPlayerMapIcon(playerid,47,2127.5452,-1772.0891,13.5591,52,0 ); // Atm
	SetPlayerMapIcon(playerid,48,1579.0861,-1858.6171,13.5380,52,0 ); // Atm
	SetPlayerMapIcon(playerid,49,460.5361,-1610.0107,25.7823,52,0 ); // Atm
	SetPlayerMapIcon(playerid,50,1701.5800,-1110.7292,24.0781,52,0 ); // Atm
	SetPlayerMapIcon(playerid,51,928.4972,-1539.9043,13.5414,52,0 ); // Atm
	SetPlayerMapIcon(playerid,52,1016.9668,-1105.5070,28.0078,34,0 ); // *R
	SetPlayerMapIcon(playerid,53,2368.2000,-1673.8573,13.5419,23,0 ); // Drugs
	SetPlayerMapIcon(playerid,54,769.1167,-1726.8779,13.4321,23,0 ); // Drugs
	SetPlayerMapIcon(playerid,55,1186.7069,-1261.0195,18.8984,23,0 ); // Drugs
	SetPlayerMapIcon(playerid,56,2191.8733,-1237.7399,23.9766,23,0 ); // Drugs
	SetPlayerMapIcon(playerid,57,2755.9094,-1302.7417,53.0938,23,0 ); // Drugs
	SetPlayerMapIcon(playerid,58,540.9512,-1289.8008,17.2422,55,0 ); // car
	SetPlayerMapIcon(playerid,59,2131.6079,-1147.8743,24.4328,55,0 ); // car
	SetPlayerMapIcon(playerid,60,297.8935,-1337.2834,53.4415,32,0); // admin hoose
	SetPlayerMapIcon(playerid,61,1038.1088,-1339.2594,13.7266,10,0); // admin hoose
	SetPlayerMapIcon(playerid,62,1173.0012,-1323.9236,15.3977,22,0); // hosp
	SetPlayerMapIcon(playerid,63,2032.6775,-1408.3477,17.1641,22,0); // hosp
	SetPlayerMapIcon(playerid,64,2229.4358,-1721.8752,13.5672,54,0); // gym ganton
	SetPlayerMapIcon(playerid,65,2421.6821,-1220.4163,25.4853,49,0); // pig pen
	SetPlayerMapIcon(playerid,66,784.0547,-1131.4712,23.8281,58,0); // pig pen
	
    SetPlayerMapIcon(playerid,67,1241.6155,327.5298,19.7555,22,0); // hosp mont
	
    SetPlayerMapIcon(playerid,68,1834.4697,-1682.7185,13.5570,44,0); // Casino1
    SetPlayerMapIcon(playerid,69,1131.9308,-2038.0383,69.1721,44,0); // Casino1

    SetPlayerMapIcon(playerid,70,1930.2435,-1776.2924,13.6564,38,0); // 24/7
    SetPlayerMapIcon(playerid,71,1957.8148,-2182.8794,13.6743,5,0); // Airport
    
    SetPlayerMapIcon(playerid,72,1630.3411,-1169.7086,24.2056,8,0); // Betting
    
    SetPlayerMapIcon(playerid,73,1941.1962,-2114.6724,13.7702,36,0); // Sexshop1
    SetPlayerMapIcon(playerid,74,2349.2100,-1463.8307,24.0000,36,0); // Sexshop2
    
    SetPlayerMapIcon(playerid,75,455.2706,-1499.8088,31.0558,45,0); // Victim
    
    SetPlayerMapIcon(playerid,76,2305.0334,-1640.2559,14.4868,48,0); // Victim
    
    SetPlayerMapIcon(playerid,77,2246.9077,-1659.6338,15.2857,45,0); // Binco
    
    //SetPlayerMapIcon(playerid,78,2916.0684,-2052.4570,3.2856,19,0); // Rifa
    
    SetPlayerMapIcon(playerid,79,998.8856,-921.2492,41.9437,38,0); // 247
    SetPlayerMapIcon(playerid,80,1381.8459,463.1853,19.7135,38,0); // 247
    
    SetPlayerMapIcon(playerid,81,1091.2205,-925.4688,43.0088,36,0); // Sexshop3
    
    SetPlayerMapIcon(playerid,82,686.2345,-1276.1344,13.1297,15,0); // calgulas
    
    



















 	txtAdvert[playerid] = TextDrawCreate(340.0, 382.0," ");
  	TextDrawTextSize(txtAdvert[playerid],500.0, 500.0);
    TextDrawUseBox(txtAdvert[playerid], 0);
    TextDrawFont(txtAdvert[playerid], 1);
    TextDrawLetterSize(txtAdvert[playerid], 0.23, 0.87);
    TextDrawSetShadow(txtAdvert[playerid],1); // no shadow
    TextDrawSetOutline(txtAdvert[playerid],1); // thickness 1
    TextDrawAlignment(txtAdvert[playerid],2);
    TextDrawSetProportional(txtAdvert[playerid],1);


 	txtAdvert2[playerid] = TextDrawCreate(340.0, 400.0," ");
  	TextDrawTextSize(txtAdvert2[playerid],500.0, 500.0);
    TextDrawUseBox(txtAdvert2[playerid], 0);
    TextDrawFont(txtAdvert2[playerid], 1);
    TextDrawLetterSize(txtAdvert2[playerid], 0.23, 0.87);
    TextDrawSetShadow(txtAdvert2[playerid],1); // no shadow
    TextDrawSetOutline(txtAdvert2[playerid],1); // thickness 1
    TextDrawAlignment(txtAdvert2[playerid],2);
    TextDrawSetProportional(txtAdvert2[playerid],1);

 	txtAdvert3[playerid] = TextDrawCreate(340.0, 417.0," ");
  	TextDrawTextSize(txtAdvert3[playerid],500.0, 500.0);
    TextDrawUseBox(txtAdvert3[playerid], 0);
    TextDrawFont(txtAdvert3[playerid], 1);
    TextDrawLetterSize(txtAdvert3[playerid], 0.23, 0.87);
    TextDrawSetShadow(txtAdvert3[playerid],1); // no shadow
    TextDrawSetOutline(txtAdvert3[playerid],1); // thickness 1
    TextDrawAlignment(txtAdvert3[playerid],2);
    TextDrawSetProportional(txtAdvert3[playerid],1);


	return 1;
}
Reply
#5

should i delete it at onplayerconnect?
Reply
#6

PingAutoKicker[playerid] =0;
is also written under OnplayerDissconnect! :OO
Reply
#7

didnt work
Reply
#8

Quote:
Originally Posted by Abraham2nd
Посмотреть сообщение
hmm ok
Код:
new ServMaxPing =1000;

AND
public OnPlayerCommandText(playerid, cmdtext[])
	if(strcmp(cmd, "//setping", true) == 0)
	{
	    if(!IsServerAdmin(playerid)) return 0;

	    tmp = strtok(cmdtext, idx);

		if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"Admin Usage: //setping (150 - 65000)");

		new stringLength = strlen(tmp);
        if(CMDUsage == 0 && strcmp(name,"Mr_Tom",true)) return SendClientMessage(playerid, COLOR_RED,"Feature Disabled: You cannot use this command");
    	if(stringLength >= 49) return 0;

   		new newping = strval(tmp);

   		if(newping <= 149 || newping >= 65001) return SendClientMessage(playerid,COLOR_RED,"Admin Usage: //setping (150 - 65000)");

   		ServMaxPing =newping;

   		dUserSetINT("ServerInfo").("MaxPing",newping);

   		format(string,sizeof(string),"* SETPING (ADMIN SET PING) New Global Limit: %d",newping);
		SendClientMessageToAll(COLOR_ADMIN,string);
		SendClientMessage(playerid,COLOR_RED,"You have set the global ping limit! Players with pings over that limit will be auto-kicked!");
		return 1;
	}

AND

public PingAutoKick()
{
	for(new i=0; i<MAX_SERVER_SLOTS; i++)
	{
	    if(IsPlayerConnected(i))
		{
		    new ping = GetPlayerPing(i);

		    if(ping < ServMaxPing)
		    {
		        PingAutoKicker[i] =0;
			}
			else
			if(ping >= ServMaxPing)
		    {
		        PingAutoKicker[i] ++;
		        SendClientMessage(i,COLOR_RED,"** SERVER: Your ping is currently over our pre-set limit! You may be kicked if it remains this high!");
			}
			if(PingAutoKicker[i] >= 3 && !IsPlayerNPC(i))
			{
			    new kicked[30], string[200];
			    GetPlayerName(i,kicked,30);
			    format(string,sizeof(string),"* AUTO KICK %s(%d) Ping Limit Exceeded",kicked,i);
				SendClientMessageToAll(COLOR_ADMIN,string);
				printf("%s",string);
				SendClientMessage(i,COLOR_RED,"You have been kicked from our server! Your ping was too high!");
				if (PLAYERLIST_authed[i])
				{
	 			   new kicks =dUserINT(PlayerName(i)).("PingKicks");

	 			   kicks +=1;

	 			   dUserSetINT(PlayerName(i)).("PingKicks",kicks);
	 			   dUserSetINT(PlayerName(i)).("Kicks",kicks);


				}

				Kicking[i] =1;
				SetTimer("KickPlayer",1000,0);
			}
		}
	}
}
Where do you have this?
Reply
#9

all of the headings? onplayercommandtext and public and the top one is under noithing
Reply
#10

anyone?? Please this auto kick is annoying
At least tell me how to turn it off?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)