pawn Код:
// 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;
}
It ban me when I type /ban.
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 .