if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid);
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
switch(weaponid){ case 0..18, 38..54: return 1;}//invalid weapons
if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid);
{
new Float:Shot[3], Float:Hit[3];
GetPlayerLastShotVectors(playerid, Shot[0], Shot[1], Shot[2], Hit[0], Hit[1], Hit[2]);
new playersurf = GetPlayerSurfingVehicleID(playerid);
new hitsurf = GetPlayerSurfingVehicleID(hitid);
new Float:targetpackets = NetStats_PacketLossPercent(hitid);
new Float:playerpackets = NetStats_PacketLossPercent(playerid);
if(~(playersurf) && ~(hitsurf) && !IsPlayerInAnyVehicle(playerid) && !IsPlayerInAnyVehicle(hitid))
{
if(!IsPlayerAimingAtPlayer(playerid, hitid) && !IsPlayerInRangeOfPoint(hitid, 5.0, Hit[0], Hit[1], Hit[2]))
{
new string[128], issuer[24];
GetPlayerName(playerid, issuer, 24);
AimbotWarnings[playerid] ++;
if(AimbotWarnings[playerid] > 2)
{
if(targetpackets < 1.2 && playerpackets < 1.2) return Kick(playerid);
else
{
SendClientMessage(playerid, -1, "Vocк foi kikado por suspeita de aimbot!");
format(string, sizeof(string), "%s foi kikado por suspeita de aimbot!", issuer);
ABroadCast(0x33CCFFAA, string, 1);
Kick(playerid);
}
}
Erro simples de sintaxe. Troque o ponto e vнrgula no final da linha por um fecha parкnteses.
|
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : error 029: invalid expression, assumed zero
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : error 001: expected token: ";", but found ")"
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : error 029: invalid expression, assumed zero
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : fatal error 107: too many error messages on one line
if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid));
if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid))
switch(weaponid){ case 0..18, 38..54: return 1;}//invalid weapons
pawn Код:
pawn Код:
|
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : error 029: invalid expression, assumed zero
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : error 001: expected token: ";", but found ")"
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : error 029: invalid expression, assumed zero
C:\Users\pc 2\Desktop\BPV\gamemodes\GMBPV.pwn(51990) : fatal error 107: too many error messages on one line
if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid);
if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid))
switch(weaponid){ case 0..18, 38..54: return 1;}//invalid weapons
errado :
pawn Код:
pawn Код:
o erro tbm nгo estб aqui pawn Код:
|
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { switch(weaponid){ case 0..18, 38..54: return 1;}//invalid weapons if(hittype == BULLET_HIT_TYPE_PLAYER && IsPlayerConnected(hitid) && !IsPlayerNPC(hitid) { new Float:Shot[3], Float:Hit[3]; GetPlayerLastShotVectors(playerid, Shot[0], Shot[1], Shot[2], Hit[0], Hit[1], Hit[2]); new playersurf = GetPlayerSurfingVehicleID(playerid); new hitsurf = GetPlayerSurfingVehicleID(hitid); new Float:targetpackets = NetStats_PacketLossPercent(hitid); new Floatlayerpackets = NetStats_PacketLossPercent(playerid); if(~(playersurf) && ~(hitsurf) && !IsPlayerInAnyVehicle(playerid) && !IsPlayerInAnyVehicle(hitid)) { if(!IsPlayerAimingAtPlayer(playerid, hitid) && !IsPlayerInRangeOfPoint(hitid, 5.0, Hit[0], Hit[1], Hit[2])) { new string[128], issuer[24]; GetPlayerName(playerid, issuer, 24); AimbotWarnings[playerid] ++; if(AimbotWarnings[playerid] > 2) { if(targetpackets < 1.2 && playerpackets < 1.2) return Kick(playerid){ }else{ SendClientMessage(playerid, -1, "Vocк foi kikado por suspeita de aimbot!"); format(string, sizeof(string), "%s foi kikado por suspeita de aimbot!", issuer); ABroadCast(0x33CCFFAA, string, 1); Kick(playerid); } } } } |