Safe zones
#1

ok i looked all over for a tutorial for this but couldent find one...

i want to make places like races and stunt zones safe zones so that when some one enters it it gets rid of weapons and wont let rhinos hunters or hydras in

so if some one knows a tutorial for this can you give me a link?

thanks in advance
Reply
#2

For Weapons use this functions:

// All credits for Amit_Barami (Amit B).
Top of script:
pawn Код:
new pWeapons[MAX_PLAYERS][13][2];

pawn Код:
stock SavePlayerWeapons(playerid)
{
    for(new i=0;i<13;i++)
    {
        GetPlayerWeaponData(playerid,i,pWeapons[playerid][i][0],pWeapons[playerid][i][1]);
    }
    return 1;
}
pawn Код:
stock LoadPlayerWeapons(playerid)
{
    for(new i=0;i<13;i++) GivePlayerWeapon(playerid,pWeapons[playerid][i][0],pWeapons[playerid][i][1]);
    return 1;
}
and for the Hunter/Hydra system, use IsPlayerInArea / PlayerToPoint function in OnPlayerUpdate callback.

Reply
#3

Don't use either of those functions in OnPlayerUpdate. Use IsPlayerInRangeOfPoint in a 500ms timer, assuming there's only a few safe zones AND you're using 'foreach by ******'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)