IsPlayerInArea Problem
#1

Ok well this is my first try at IsPlayerInArea
I have the include file so i dont get the include problem
But i do get this....
Код:
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 213: tag mismatch
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 202: number of arguments does not match definition
And here is my script
pawn Код:
IsPlayerInArea(playerid, 2356.912, -2700.379, 2832.266, -2356.926);
        SendClientMessage(playerid, COLOR_WHITE, "Test Positive");
What am i doing wrong?
Reply
#2

Quote:
Originally Posted by JoeDaDude
Ok well this is my first try at IsPlayerInArea
I have the include file so i dont get the include problem
But i do get this....
Код:
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 213: tag mismatch
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Joe\Desktop\Server\gamemodes\sftdm.pwn(881) : warning 202: number of arguments does not match definition
And here is my script
pawn Код:
IsPlayerInArea(playerid, 2356.912, -2700.379, 2832.266, -2356.926);
        SendClientMessage(playerid, COLOR_WHITE, "Test Positive");

What am i doing wrong?
Im not sure but i might be:
pawn Код:
if(IsPlayerInArea(playerid, 2356.912, -2700.379, 2832.266, -2356.926))
{
    SendClientMessage(playerid, COLOR_WHITE, "Test Positive");
}
Or something...
Reply
#3

Im still recieving the same errors
Reply
#4

try to remove the last coord...
no rotation should be needed ?
Reply
#5

Its not a rotation,
Its a MinimumX, MinimumZ, MaximumX, MaximumZ
Reply
#6

I think the best is if you show the code from the IsPlayerInArea include
Reply
#7

pawn Код:
stock IsPlayerInAreaEx(playerid, Float:...) //By kool
{
    new Count = numargs();
    new Float:xe[255], Float:ye[255];
    new j=0;
    for(new i=1; i<Count; i+=2)
    {
        xe[j] = Float:getarg(i);
        ye[j] = Float:getarg(i+1);
        j++;
    }
    xe[j] = xe[0];
    ye[j] = ye[0];
    new Lines;
    new Float:xcut;
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i=0; i<j; i++)
    {
        xcut = xe[i]+((y-ye[i])*(xe[i+1]-xe[i])/(ye[i+1]-ye[i]));
        if(((y >= ye[i] && y <= ye[i+1]) || (y >= ye[i+1] && y <= ye[i])) && xcut < x)
        {
            Lines++;
        }
    }
    if(Lines%2 == 1)
    {
        return 1;
    }
    return 0;
}
Reply
#8

Any Help Will Be Much Appreciated,

EDIT: Sorry for double post
Reply
#9

That code is rly hard to understand

I suggest to use a normal one
Reply
#10

What would you have for example,
I need something so a certain command will only work if the player is at ls docks,
if there outside that area then it wont work
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)