04.02.2016, 14:19
First define the MAX plants
PHP код:
#define MAX_PLANTS 300
PHP код:
#define MAX_PLANTS Your amount
PHP код:
for(new i = 0; i < MAX_PLANTS; ++i)
{
if(IsValidDynamicObject(Plants[i][pObjectSpawned]) && IsPlayerInRangeOfPoint(playerid, 2.5, Plants[i][pPos][0], Plants[i][pPos][1], Plants[i][pPos][2]))
{
if(GetPlayerVirtualWorld(playerid) == Plants[i][pVirtual] && GetPlayerInterior(playerid) == Plants[i][pInterior])
{