SA-MP Forums Archive
ping checker,and gamemode and map :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ping checker,and gamemode and map :D (/showthread.php?tid=106353)



ping checker,and gamemode and map :D - Lajko1 - 02.11.2009

i want to ask something , i try this for my ping check / kicker

Код:
stock CheckPing(playerid)
{
  //Get the player's ping and kick if it's excessive
  if(GetPlayerPing(playerid) > 32)
  {
  new playerid[MAX_PLAYER_NAME];
  SendClientMessageToAll(0xFF66FFAA,"**(AUTO KICK)Player %s %d Kicked REASON:(To Much Ping)",playerid);
  Kick(playerid);
  }
}
i know this is not 100% right so i want to ask for help if you can fix that

i want when player have for example 32 ping or more he get KICK and there will be client message for all like in my ''example''

i hope anyone can help with this

and i want to ask this , how i can make gamemode name ? so when players wanna joint to my server there should write in ''samp'' program (server name - thats ok,GAMEMODE NAME - how to make this ? , AND MAP NAME - HOW TO MAKE THIS ?

for example:

Server Name Gamemode Map
Weed's CNR Cops And Robbers Las Venturas

i hope you know what i mean ty for any help



Re: ping checker,and gamemode and map :D - klavins - 02.11.2009

in server.cfg add this
mapname Las Venturas


Re: ping checker,and gamemode and map :D - Lajko1 - 02.11.2009

ty , and how to solve other 2 problems anyone know ?


Re: ping checker,and gamemode and map :D - GhOstY93 - 02.11.2009

add this under game mode init:
Код:
SetGameModeText("NAME YOUR GAMEMODE HERE");
Replace NAME YOUR GAMEMODE HERE with anything u want


Re: ping checker,and gamemode and map :D - MadeMan - 02.11.2009

pawn Код:
stock CheckPing(playerid)
{
    //Get the player's ping and kick if it's excessive
    if(GetPlayerPing(playerid) > 32)
    {
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
        new msg[128];
        format(msg, sizeof(msg), "**(AUTO KICK)Player %s %d Kicked REASON:(Too Much Ping)",playername,playerid);
        SendClientMessageToAll(0xFF66FFAA,msg);
        Kick(playerid);
    }
}