30.08.2011, 10:28
Please help me ! How can i make something like that if player enters some are (cube) his weapons will disappear but when he leaves area his weapons will be loaded again (something like no-kill zone). So how pls ?
new weapons[MAX_PLAYERS][13][2];
//When the player enters a zone
for (new i = 0; i < 13; i++) GetPlayerWeaponData(playerid, i, weapons[playerid][i][0], weapons[playerid][i][1]);
ResetPlayerWeapons(playerid);
//When the player exits the zone
for (new i = 0; i < 13; i++) if(weapons[playerid][i][0] != 0) GivePlayerWeapon(playerid, weapons[playerid][i][0], weapons[playerid][i][1]);
IsPlayerInCube(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy, Float:minz, Float:maxz)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy && z > minz && z < maxz) return 1;
return 0;
}
pawn Код:
|