stock or static stock
#1

Which of them is better ?
Quote:

stock IsPlayerNear(playerid,giveplayerid)
{
new Float: x[3];
GetPlayerPos(playerid, x[0], x[1], x[2]);
if(IsPlayerInRangeOfPoint(giveplayerid, 5, x[0], x[1], x[2])) return 1;
return 0;
}

or
Quote:

static stock IsPlayerNear(playerid,giveplayerid)
{
new Float: x[3];
GetPlayerPos(playerid, x[0], x[1], x[2]);
if(IsPlayerInRangeOfPoint(giveplayerid, 5, x[0], x[1], x[2])) return 1;
return 0;
}

Reply
#2

Well you need stock only if you create an include file
And static only if you want to restrict this function to the include file

For filterscripts or gamemode you should go with that
pawn Код:
IsPlayerNear(playerid, giveplayerid) {
    new
        Float: x,
        Float: y,
        Float: z
    ;
    return GetPlayerPos(playerid, x, y, z) && IsPlayerInRangeOfPoint(giveplayerid, 5.0, x, y, z);
}
Reply
#3

I suggest Stock.
Reply
#4

Thanks Nero_3D
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)