What's mean this ?
#1

Can somebady tell me what are doing this 2 "parameters"

first one : that 2 points ( : )
the last one : the question mark ( ? )

Here's an Boylet Example :

pawn Код:
bool:IsInReach(Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2,Float:dist)
{
    x = (x > x2) ? x - x2 : x2 - x;
    if(x > dist) return false;
    y = (y > y2) ? y - y2 : y2 - y;
    if(y > dist) return false;
    z = (z > z2) ? z - z2 : z2 - z;
    if(z > dist) return false;
    return true;
}
Reply
#2

i've made this "command"

pawn Код:
if(!strcmp(cmd, "/test",true))
    {
        new a = 10;
        new b = 2;
        new restul = b ? a : 2;
        format(string,sizeof(string),"%d",restul);
        SendClientMessage(playerid,COLOR_LIGHTGREEN,string);
        return 1;
    }
And when i type /test , it results me 10 ...
Reply
#3

e1 ? e2 :e3 if e1 is true the answer is e2 and if e1 is false the answer is e3

make sence? there for 10
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)