SA-MP Forums Archive
[Ajuda] ajuda eu aqui '-' so novatao em pawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] ajuda eu aqui '-' so novatao em pawn (/showthread.php?tid=388198)



ajuda eu aqui '-' so novatao em pawn - Black_Fortress - 27.10.2012

Quote:

C:\Users\Microsoft\Downloads\samp03e_svr_R2_win32\ gamemodes\lvdm.pwn(930) : error 001: expected token: ";", but found "switch"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Codigo

Quote:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(GetPlayerCameraMode(issuerid) != 53 || !IsPlayerConnected(issuerid)) return 1
switch(weaponid)
{
case 22..34:
{
if(GetPlayerTargetPlayer(issuerid) == INVALID_PLAYER_ID)
{
new string[61], Nome[24];
GetPlayerName(issuerid, Nome, 24);
format(string, sizeof(string), "admcmd: [%d]%s estб usando AimBot.", issuerid, Nome);
for(new i, PT = MAX_PLAYERS; i < PT; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) SendClientMessage(i, -1, string);
}
}
}
return 1;
}

se alguem conhecer um ant-aimbot melhor, se tiver como me passar eu agradeзo


Respuesta: ajuda eu aqui '-' so novatao em pawn - caoraivoso3 - 27.10.2012

vou tentar resolver


Re: ajuda eu aqui '-' so novatao em pawn - FhosT - 27.10.2012

Tenta..
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(GetPlayerCameraMode(issuerid) != 53 || !IsPlayerConnected(issuerid)) return 1;
switch(weaponid)
{
case 22..34:
{
if(GetPlayerTargetPlayer(issuerid) == INVALID_PLAYER_ID)
{
new string[61], Nome[24];
GetPlayerName(issuerid, Nome, 24);
format(string, sizeof(string), "admcmd: [%d]%s estб usando AimBot.", issuerid, Nome);
for(new i, PT = MAX_PLAYERS; i < PT; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) SendClientMessage(i, -1, string);
}
}
}
return 1;
}



Re: ajuda eu aqui '-' so novatao em pawn - Black_Fortress - 27.10.2012

Vlw deu certo reput pra vcs


Re: ajuda eu aqui '-' so novatao em pawn - MatheusAlcapone - 27.10.2012

arrume essa sua endentaзгo ela ira causar warnings no seu gamemode


Re: ajuda eu aqui '-' so novatao em pawn - Black_Fortress - 27.10.2012

tipo nao deu erro nem nada ,mais eu e um amigo meu fomos testar essa ant-aim ,ele instalo la ,ai quando ele ta usando nao flooda o ant-aim "admcmd: [%d]%s estб usando AimBot" ,alguem sabe pq ?


Re: ajuda eu aqui '-' so novatao em pawn - CrusherCpt - 28.10.2012

Lol, esse era facil..

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(GetPlayerCameraMode(issuerid) != 53 || !IsPlayerConnected(issuerid)) return 1;//Faltava ; a seguir do return, tem de ter sempre..
switch(weaponid)
{
case 22..34:
{
if(GetPlayerTargetPlayer(issuerid) == INVALID_PLAYER_ID)
{
new string[61], Nome[24];
GetPlayerName(issuerid, Nome, 24);
format(string, sizeof(string), "admcmd: [%d]%s estб usando AimBot.", issuerid, Nome);
for(new i, PT = MAX_PLAYERS; i < PT; i++) if(IsPlayerConnected(i) && IsPlayerAdmin(i)) SendClientMessage(i, -1, string);
}
}
}
return 1;
}



Re: ajuda eu aqui '-' so novatao em pawn - Black_Fortress - 28.10.2012

Galera uma duvida ,este que postei ai nao funciono ,mais este aqui ele funciona mais ele floda o console do servidor ,alguem sabe colocar ele pra flodar o ant-xiter dentro do jogo ? tipo "tal players esta usando aimbot"

Codigo

Quote:

/*
Autoaim detection script - NOT joypad.

- By Whitetiger

- Credits: Lorenc_, TheGamer!, [U]214
*/

#include <a_samp>

#define DEBUG 0

new bool:autoaim[MAX_PLAYERS] = {false, ...};
new checkautoaim[MAX_PLAYERS] = {9999, ...};
new pressingaimtick[MAX_PLAYERS] = {-1, ...};
new bool:keyfire[MAX_PLAYERS] = {false, ...};
new bool:ispressingaimkey[MAX_PLAYERS] = {false, ...};
new bool:CheckNextAim[MAX_PLAYERS] = {false, ...};

public OnFilterScriptInit() {
for(new i=0; i < MAX_PLAYERS; ++i) {
if(IsPlayerConnected(i)) {
OnPlayerConnect(i);
}
}
return 1;
}

public OnPlayerConnect(playerid) {
checkautoaim[playerid] = 9999;
pressingaimtick[playerid] = -1;
autoaim[playerid] = false;
keyfire[playerid] = false;
ispressingaimkey[playerid] = false;
CheckNextAim[playerid] = false;

return 1;
}

public OnPlayerUpdate(playerid) {
new var = GetPlayerTargetPlayer(playerid);
if(var != INVALID_PLAYER_ID) {
CheckNextAim[playerid] = true;
}
#if DEBUG == 1
new str[129];
format(str, sizeof(str), "%d", GetPlayerTargetPlayer(playerid));
SendClientMessage(playerid, -1, str);
#endif
if(checkautoaim[playerid] <= 10) {
if(var != INVALID_PLAYER_ID) {
checkautoaim[playerid] = 9999;
}
checkautoaim[playerid]++;
if(checkautoaim[playerid] == 11) {

#if DEBUG == 1
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(str, sizeof(str), "*** AUTOAIM WARNING - %s ***", pname);
SendClientMessageToAll(-1, str);
#endif
autoaim[playerid] = true;

CallRemoteFunction("OnPlayerDetectedAutoaim", "d", playerid);
}
}
return 1;
}



public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {

new Float:X, Float:Y, Float:Z;
GetPlayerPos(damagedid, X, Y, Z);
new str[128];
format(str, sizeof(str), "%d == false %d < %d && %d != -1 && %d == 53 && %d == %d && %d == 1 && %d && %d == false", CheckNextAim[playerid], pressingaimtick[playerid], GetTickCount(), pressingaimtick[playerid], GetPlayerCameraMode(playerid), GetPlayerTargetPlayer(playerid), INVALID_PLAYER_ID, IsPlayerInRangeOfPoint(playerid, 50, X, Y, Z), notallowed(weaponid), keyfire[playerid]);
#if DEBUG == 1
SendClientMessage(playerid, -1, str);
#endif
printf(" Autoaim Detection information: %s", str);
if(CheckNextAim[playerid] == false && pressingaimtick[playerid] < GetTickCount() && pressingaimtick[playerid] != -1 && GetPlayerCameraMode(playerid) == 53 && GetPlayerTargetPlayer(playerid) == INVALID_PLAYER_ID && IsPlayerInRangeOfPoint(playerid, 50, X, Y, Z) == 1 && notallowed(weaponid) && keyfire[playerid] == false && !IsPlayerInAnyVehicle(damagedid)) {
checkautoaim[playerid] = 0;
}
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(!(oldkeys & KEY_FIRE) && (newkeys & KEY_FIRE) && !(newkeys & KEY_HANDBRAKE)) {
keyfire[playerid] = true;
} else if(!(newkeys & KEY_FIRE)) keyfire[playerid] = false;
if(!ispressingaimkey[playerid]) CheckNextAim[playerid] = false;
ispressingaimkey[playerid] = !!(newkeys & KEY_HANDBRAKE);
if(ispressingaimkey[playerid] && !(oldkeys & KEY_HANDBRAKE)) {
pressingaimtick[playerid] = GetTickCount()+500;
}
return 1;
}


stock notallowed(weaponid) {
switch(weaponid) {

case 25..27, 16..18, 34..37, 39..40, 43..200: return 0;
// Blocks shotguns, sniper rifle, RPG, heat seaker satchel charges etc - besides shotguns these are unaffected by autoaim
// the reason shotguns are removed from checking is because i've found them to be unreliable.
default:return 1;
}
return 1;
}


stock IsPlayerUsingAutoaim(playerid) return autoaim[playerid];