IsPlayerInArea/Cube ?
#1

Is there a way to do something like
pawn Code:
public blablabla
{
    if(something == 999 && !IsPlayerInArea(...))
    else if(!IsPlayerInCube(...))
    {
        //code
    }else{
        //code
    }
    return 1;
}
2 functions in 1 public
Reply
#2

Yes. Why wouldn't it be possible?
Reply
#3

So can u give me an example? or someone else
Reply
#4

none saw that topic ?
Reply
#5

I dont want that, its too long for me
pawn Code:
public blablabla
{
    if(something == 999)
    {
        if(!IsPlayerInArea(...))
        {
            //code
        }else{
            //code
        }
    }else{
        if(!IsPlayerInCube(...))
        {
            //code
        }else{
            //code
        }
    }
    return 1;
}
is there a way to shorten this code for example
pawn Code:
public blablabla
{
    if(something == 999 && !IsPlayerInArea(...))
    else if(!IsPlayerInCube(...))
    {
        //code
    }else{
        //code
    }
    return 1;
}
only these 2 lines
pawn Code:
if(something == 999 && !IsPlayerInArea(...))
else if(!IsPlayerInCube(...))
Reply
#6

I suggest you to not mix else if, like

if(IHaveApple == 1) { Says: I have one apple; }
else if(IHaveBerries == 2) { Says: I have two berries; }
else if(IHaveApple == 2) { Says: I have two apple; }

I hope you got it what I mean, you should use if .. if, if you compare different things.
Reply
#7

Ok solved, i am genious xD !!! fuck jea
Reply
#8

way to go genious
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)