02.03.2011, 00:16
How can i make this so if im banned by using JetPack.. then i try to connect i get a message like
"You is banned from this server"
"You got banned because you spawned a jetpack"
How can i make like that,
Something like: xD
"You is banned from this server"
"You got banned because you spawned a jetpack"
How can i make like that,
pawn Код:
#include <a_samp>
forward AntiCheat();
public OnFilterScriptInit()
{
SetTimer("AntiCheat", 1000, true);
return 1;
}
public AntiCheat()
{
//Jetpack
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerAdmin(i) && IsPlayerConnected(i))
{
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s(%d) Spawned a Jetpack and got banned :)", name, i);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "Jetpack");
return 1;
}
}
}
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
if(IsPlayerBannedForJetpack))
{
SendClientMessage(playerid, 0xFF0000FF, "You is banned from this server");
SendClientMessage(playerid, 0xFF0000FF, "Reason: JetPack hack");
return 1;
}
return 1;
}