24.02.2011, 17:09
(
Последний раз редактировалось Mean; 10.04.2011 в 14:05.
)
Knew about SendRconCommand, but didn't know what is the cmd to unban da IP in RCON. Thank you.
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new pIP[20];
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new tst[50];
format(tst,50,"unbanip %s",pIP);
SendRconCommand(tst);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/ban", cmdtext, true, 10) == 0)
{
GetPlayerIp(playerid,pIP,20);
new tst[50];
format(tst,50,"banip %s",pIP);
SendRconCommand(tst);
return 1;
}
return 0;
}
Aint working for me
Code I used pawn Код:
When I disconnect it does unban me, but I have to quit GTA SAN AN and come back. If i dont exit my game, it said You are banned . |
Sorry for bumping but why this works for me only when I'm in class selection ? Elsewhere it doesnt unban the IP.
|