[Help]
#1

I have a filterscript of anti airbreake hacks and I decided to add it to my gamemode, so I made it include, While filterscript compiles has no errors, but when I compile it with the gamemode shows up this mistakes:

pawn Код:
../Alex/acmds.inc.pwn(49) : error 025: function heading differs from prototype
../Alex/acmds.inc.pwn(50) : error 021: symbol already defined: "IsPlayerInArea"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
[49]}
[50]stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
Reply
#2

It's because of your forward, use
pawn Код:
forward IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy);
Reply
#3

pawn Код:
C:\Users\Alex\Desktop\CodSamp\Backup Server\pawno\include\gl_common.inc(120) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\pawno\include\a_zones.inc(418) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\pawno\include\a_zones.inc(418) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\pawno\include\a_zones.inc(418) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3001) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3001) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3001) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3014) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3014) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3014) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3027) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3027) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3027) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3040) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3040) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3040) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3053) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3053) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3053) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3068) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3068) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3068) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3081) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3081) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3081) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3094) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3094) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3094) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3107) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3107) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3107) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3120) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3120) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3120) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3133) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3133) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3133) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3146) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3146) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3146) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3159) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3159) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3159) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3172) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3172) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3172) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3185) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3185) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(3185) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4216) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4216) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4216) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4225) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4225) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4225) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4284) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4284) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4284) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4370) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4370) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(4370) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(6540) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(6540) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(6540) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10700) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10700) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10700) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10798) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10798) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10798) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10808) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10808) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10808) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10818) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10818) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10818) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10828) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10828) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10828) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(10988) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11039) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11039) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11039) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11060) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11060) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11060) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11078) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11078) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(11078) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(13892) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14021) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14021) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14021) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14076) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14076) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14076) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14174) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14174) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14174) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14373) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14373) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14373) : warning 219: local variable "z" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14384) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14384) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14384) : warning 219: local variable "z" shadows a variable at a preceding level
../Alex/acmds.inc.pwn(49) : error 025: function heading differs from prototype
../Alex/acmds.inc.pwn(50) : error 055: start of function body without function header
../Alex/acmds.inc.pwn(52) : error 021: symbol already defined: "GetPlayerPos"
../Alex/acmds.inc.pwn(53) : error 010: invalid function or declaration
../Alex/acmds.inc.pwn(54) : error 010: invalid function or declaration
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14422) : warning 203: symbol is never used: "x"
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14422) : warning 203: symbol is never used: "y"
C:\Users\Alex\Desktop\CodSamp\Backup Server\gamemodes\COD5.pwn(14422) : warning 203: symbol is never used: "z"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply
#4

That's because you have declared "x", "y" and "z" in the global scope probably.
Reply
#5

So what can I DO TO FIX IT?
Reply
#6

When you introduce 'x', 'y', or 'z' in a global scope (out of a callback), then attempt to introduce it again inside a callback, it will not work correctly; therefor giving you those warnings.

EDIT: post above, don't rage, find your global 'x','y', and 'z' and remove them!
Reply
#7

This is my code:

pawn Код:
forward AntiSH(playerid);
public AntiSH(playerid)
{
if(GetSpeedKM(playerid) > 300)
{
Ban(playerid);
}
return 1;
}

stock IsPlayerInWater(playerid)
{
new Float:x,Float:y,Float:pz;
GetPlayerPos(playerid,x,y,pz);
if (
(IsPlayerInArea(playerid, 2032.1371, 1841.2656, 1703.1653, 1467.1099) && pz <= 9.0484) //lv piratenschiff
|| (IsPlayerInArea(playerid, 2109.0725, 2065.8232, 1962.5355, 10.8547) && pz <= 10.0792) //lv visage
|| (IsPlayerInArea(playerid, -492.5810, -1424.7122, 2836.8284, 2001.8235) && pz <= 41.06) //lv staucamm
|| (IsPlayerInArea(playerid, -2675.1492, -2762.1792, -413.3973, -514.3894) && pz <= 4.24) //sf sьdwesten kleiner teich
|| (IsPlayerInArea(playerid, -453.9256, -825.7167, -1869.9600, -2072.8215) && pz <= 5.72) //sf gammel teich
|| (IsPlayerInArea(playerid, 1281.0251, 1202.2368, -2346.7451, -2414.4492) && pz <= 9.3145) //ls neben dem airport
|| (IsPlayerInArea(playerid, 2012.6154, 1928.9028, -1178.6207, -1221.4043) && pz <= 18.45) //ls mitte teich
|| (IsPlayerInArea(playerid, 2326.4858, 2295.7471, -1400.2797, -1431.1266) && pz <= 22.615) //ls weiter sьdцstlich
|| (IsPlayerInArea(playerid, 2550.0454, 2513.7588, 1583.3751, 1553.0753) && pz <= 9.4171) //lv pool цstlich
|| (IsPlayerInArea(playerid, 1102.3634, 1087.3705, -663.1653, -682.5446) && pz <= 112.45) //ls pool nordwestlich
|| (IsPlayerInArea(playerid, 1287.7906, 1270.4369, -801.3882, -810.0527) && pz <= 87.123) //pool bei maddog's haus oben
|| (pz < 1.5)
)
{
return 1;
}
return 0;
}
stock
    GetSpeedKM(playerid)
{
    new
        Float:PosX,
        Float:PosY,
        Float:PosZ,
        Float:PlayerSpeedDistance;

    GetVehicleVelocity(GetPlayerVehicleID(playerid), PosX, PosY, PosZ);
    PlayerSpeedDistance = floatmul(floatsqroot(floatadd(floatadd(floatpower(PosX, 2), floatpower(PosY, 2)),  floatpower(PosZ, 2))), 170.0);
    new
        spe = floatround(PlayerSpeedDistance * 1);
    return spe;
}
forward IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy);
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
Remember: ITS A INCLUDE.
Reply
#8

pawn Код:
forward AntiSH(playerid);
public AntiSH(playerid)
{
if(GetSpeedKM(playerid) > 300)
{
Ban(playerid);
}
return 1;
}

stock IsPlayerInWater(playerid)
{
new Float:PLAYERPOS[3];
GetPlayerPos(playerid,PLAYERPOS[0],PLAYERPOS[1],PLAYERPOS[2]);
if (
(IsPlayerInArea(playerid, 2032.1371, 1841.2656, 1703.1653, 1467.1099) && pz <= 9.0484) //lv piratenschiff
|| (IsPlayerInArea(playerid, 2109.0725, 2065.8232, 1962.5355, 10.8547) && pz <= 10.0792) //lv visage
|| (IsPlayerInArea(playerid, -492.5810, -1424.7122, 2836.8284, 2001.8235) && pz <= 41.06) //lv staucamm
|| (IsPlayerInArea(playerid, -2675.1492, -2762.1792, -413.3973, -514.3894) && pz <= 4.24) //sf sьdwesten kleiner teich
|| (IsPlayerInArea(playerid, -453.9256, -825.7167, -1869.9600, -2072.8215) && pz <= 5.72) //sf gammel teich
|| (IsPlayerInArea(playerid, 1281.0251, 1202.2368, -2346.7451, -2414.4492) && pz <= 9.3145) //ls neben dem airport
|| (IsPlayerInArea(playerid, 2012.6154, 1928.9028, -1178.6207, -1221.4043) && pz <= 18.45) //ls mitte teich
|| (IsPlayerInArea(playerid, 2326.4858, 2295.7471, -1400.2797, -1431.1266) && pz <= 22.615) //ls weiter sьdцstlich
|| (IsPlayerInArea(playerid, 2550.0454, 2513.7588, 1583.3751, 1553.0753) && pz <= 9.4171) //lv pool цstlich
|| (IsPlayerInArea(playerid, 1102.3634, 1087.3705, -663.1653, -682.5446) && pz <= 112.45) //ls pool nordwestlich
|| (IsPlayerInArea(playerid, 1287.7906, 1270.4369, -801.3882, -810.0527) && pz <= 87.123) //pool bei maddog's haus oben
|| (pz < 1.5)
)
{
return 1;
}
return 0;
}
stock
    GetSpeedKM(playerid)
{
    new
        Float:PosX,
        Float:PosY,
        Float:PosZ,
        Float:PlayerSpeedDistance;

    GetVehicleVelocity(GetPlayerVehicleID(playerid), PosX, PosY, PosZ);
    PlayerSpeedDistance = floatmul(floatsqroot(floatadd(floatadd(floatpower(PosX, 2), floatpower(PosY, 2)),  floatpower(PosZ, 2))), 170.0);
    new
        spe = floatround(PlayerSpeedDistance * 1);
    return spe;
}
forward IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy);
{
Float:PLAYERPOS1[3]; //this is where you made the mistake
GetPlayerPos(playerid, PLAYERPOS1[0], PLAYERPOS1[1], PLAYERPOS1[2]);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
Reply
#9

Quote:
Originally Posted by Schurman
Посмотреть сообщение
pawn Код:
forward AntiSH(playerid);
public AntiSH(playerid)
{
if(GetSpeedKM(playerid) > 300)
{
Ban(playerid);
}
return 1;
}

stock IsPlayerInWater(playerid)
{
new Float:PLAYERPOS[3];
GetPlayerPos(playerid,PLAYERPOS[0],PLAYERPOS[1],PLAYERPOS[2]);
if (
(IsPlayerInArea(playerid, 2032.1371, 1841.2656, 1703.1653, 1467.1099) && pz <= 9.0484) //lv piratenschiff
|| (IsPlayerInArea(playerid, 2109.0725, 2065.8232, 1962.5355, 10.8547) && pz <= 10.0792) //lv visage
|| (IsPlayerInArea(playerid, -492.5810, -1424.7122, 2836.8284, 2001.8235) && pz <= 41.06) //lv staucamm
|| (IsPlayerInArea(playerid, -2675.1492, -2762.1792, -413.3973, -514.3894) && pz <= 4.24) //sf sьdwesten kleiner teich
|| (IsPlayerInArea(playerid, -453.9256, -825.7167, -1869.9600, -2072.8215) && pz <= 5.72) //sf gammel teich
|| (IsPlayerInArea(playerid, 1281.0251, 1202.2368, -2346.7451, -2414.4492) && pz <= 9.3145) //ls neben dem airport
|| (IsPlayerInArea(playerid, 2012.6154, 1928.9028, -1178.6207, -1221.4043) && pz <= 18.45) //ls mitte teich
|| (IsPlayerInArea(playerid, 2326.4858, 2295.7471, -1400.2797, -1431.1266) && pz <= 22.615) //ls weiter sьdцstlich
|| (IsPlayerInArea(playerid, 2550.0454, 2513.7588, 1583.3751, 1553.0753) && pz <= 9.4171) //lv pool цstlich
|| (IsPlayerInArea(playerid, 1102.3634, 1087.3705, -663.1653, -682.5446) && pz <= 112.45) //ls pool nordwestlich
|| (IsPlayerInArea(playerid, 1287.7906, 1270.4369, -801.3882, -810.0527) && pz <= 87.123) //pool bei maddog's haus oben
|| (pz < 1.5)
)
{
return 1;
}
return 0;
}
stock
    GetSpeedKM(playerid)
{
    new
        Float:PosX,
        Float:PosY,
        Float:PosZ,
        Float:PlayerSpeedDistance;

    GetVehicleVelocity(GetPlayerVehicleID(playerid), PosX, PosY, PosZ);
    PlayerSpeedDistance = floatmul(floatsqroot(floatadd(floatadd(floatpower(PosX, 2), floatpower(PosY, 2)),  floatpower(PosZ, 2))), 170.0);
    new
        spe = floatround(PlayerSpeedDistance * 1);
    return spe;
}
forward IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy);
{
Float:PLAYERPOS1[3]; //this is where you made the mistake
GetPlayerPos(playerid, PLAYERPOS1[0], PLAYERPOS1[1], PLAYERPOS1[2]);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
I tested that just for the heck of it, and it didn't work.
Reply
#10

Now, I've got this errors:

pawn Код:
../Alex/acmds.inc.pwn(49) : error 025: function heading differs from prototype
../Alex/acmds.inc.pwn(50) : error 055: start of function body without function header
../Alex/acmds.inc.pwn(53) : error 010: invalid function or declaration
../Alex/acmds.inc.pwn(54) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)