17.05.2012, 23:27
pawn Код:
SetTimer("Hack", 200, true); //OnGameModeInit
forward Hack(); //Topo do GameMode
public Hack() // Final do GameMode
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new keys, updown, leftright, string[128];
GetPlayerKeys(i, keys, updown, leftright);
new Nome[MAX_PLAYER_NAME]; GetPlayerName(i, Nome, sizeof(Nome));
new Float:Pos[4]; Pos[3] = GetPlayerDistanceFromPoint(i, Pos[0], Pos[1], Pos[2]); GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
if((keys & KEY_ACTION || keys & KEY_FIRE) && (floatround(floatmul(Pos[3], 10.0)) > 200) && (IsPlayerInAnyVehicle(i)))
{
format(string, 128, "Anti-Speed Hack: [%d]%s estб usando ******!", i, Nome);
AvisarAdm(COR_VERDE, string);
}
}
}
stock AvisarAdm(color, const str[]) //Final do GameMode
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, color, str);
}
}
}
return 1;
}
explicaзгo eu '-'