Scripting Help with Playertopoint
#1

Hello, i got my problem with PlayertoPoint
I Want to do if the player is in range and in interior 0

They to something

Here my code

PHP код:
public UpdateRadiation()
{
    for(new 
0MAX_PLAYERSi++)
       {
           new 
Float:Vie;
        if(
IsPlayerConnected(i) && AdminDuty[i] == && PlayerInfo[i][pJail] == 0)
        {
            if(
PlayerToPoint(1090.0i,1915,1790,10.5048))
            {
                
GetPlayerHealth(i,Vie);
                
SetPlayerHealth(i,Vie-2);
                
GameTextForPlayer(i,"~r~Radioation Zone!",5000,3);
            }
        }
    }

This is my got for interior

PlayerInfo[i][pInt] == 0

I dont know where to put it?

Any help?
Reply
#2

Any ones no?
Reply
#3

pawn Код:
if (GetPlayerInterior(i) == 0)
{
    // code..
}
or
pawn Код:
if (!GetPlayerInterior(i))
{
    // code..
}
and it's recommended not to use PlayerToPoint but IsPlayerInRangeOfPoint instead.
Reply
#4

Thx the first code Work perfect!
Reply
#5

If you need SCRIPTING HELP, post in the SCRIPTING HELP forum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)