23.01.2013, 22:55
Does rcon banip natively check if the input is a valid ip address before banning it?
INI_ParseFile(INI_PATH(playerid),"Baninfo_%s", .bExtra = true, .extra = playerid);
|
Hi guys!
I am wondering about the "ParseFile" function in Y_Ini; is this the right way to read from a tag which is named "Baninfo" from the playerfile ? pawn Код:
Or did i totally misunderstand what ParseFile does? Thanks ^^ |
public OnPlayerRequestClass(playerid, classid)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Teams", "\nUnited States Of America\nGermany\nRussia\nItaly", "Select", "Exit");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
if(response) // If they clicked 'Yes' or pressed enter
{
if(listitem == 0){
gTeam[playerid] = TEAM_USA;
SetPlayerColor(playerid,COLOR_BLUE);
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Classes", "\nSoldier\nSniper\nEngineer\nPilot", "Select", "Exit");
}
if(listitem == 1){
gTeam[playerid] = TEAM_GERMANY;
SetPlayerColor(playerid,COLOR_ORANGE);
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Classes", "\nSoldier\nSniper\nEngineer\nPilot", "Select", "Exit");
}
if(listitem == 2){
gTeam[playerid] = TEAM_RUSSIA;
SetPlayerColor(playerid,COLOR_RED);
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Classes", "\nSoldier\nSniper\nEngineer\nPilot", "Select", "Exit");
}
if(listitem == 3){
gTeam[playerid] = TEAM_ITALY;
SetPlayerColor(playerid,COLOR_YELLOW);
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Classes", "\nSoldier\nSniper\nEngineer\nPilot", "Select", "Exit");
}
}
else // Pressed ESC or clicked cancel
{
SendClientMessage(playerid, COLOR_RED, "You left the server");
Kick(playerid);
}
return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
if(dialogid == 3)
{
if(response) // If they clicked 'Yes' or pressed enter
{
if(listitem == 0){
TogglePlayerSpectating(playerid, 0);
SendClientMessage(playerid, COLOR_RED, "Soldier");
SpawnPlayer(playerid);
GivePlayerWeapon(playerid, 12,1000);
}
if(listitem == 1){
SendClientMessage(playerid, COLOR_RED, "Sniper");
SpawnPlayer(playerid);
}
if(listitem == 2){
SendClientMessage(playerid, COLOR_RED, "Engineer");
SpawnPlayer(playerid);
}
if(listitem == 3){
TogglePlayerSpectating(playerid, 0);
SendClientMessage(playerid, COLOR_RED, "Pilot");
SpawnPlayer(playerid);
}
}
else // Pressed ESC or clicked cancel
{
SendClientMessage(playerid, COLOR_RED, "You left the server");
Kick(playerid);
}
return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
}

new obj; // at the top
SetTimerEx("MovingThisObject", 1000, false, "i", playerid);
// 1000 is 1 second, choose what you want , Note that the move object will happen 1 second or whatever you typed in seconds.
// Under OnGameModeInIt
obj = CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ); // Creates The Object
forward MovingThisObject(playerid);
public MovingThisObject(playerid)
{
MoveObject(obj, Float:X, Float:Y, Float:Z); // Moves the object to the XYZ you typed.
return 1;
}