need urgent help [rep++ in return].
#1

Hello,

Well I have a property system but it's not the typical system seen in roleplay server this one is based on a gang can attack and dominate it, and fight for it. And if the cops (criminal justice) attack and dominate it, the owner will be no-one (it will be granted back to the city). I've created the pickups and an enumaretor with the info.. however when I go pick up the pickup nothing happens at all.

First, my enumaretor:
pawn Код:
#define MAX_PROPS 12

enum prinf
{
    PickupID,
    OwnerTeam,
    Name[64],
    Float:PropX,
    Float:PropY,
    Float:PropZ,
}

new PropInfo[MAX_PROPS][prinf];
And how I create the pickups:
pawn Код:
stock CreatePickupEx( model, type, Float:x, Float:y, Float:z, teamset )
{
    PropInfo[teamset][PickupID] = CreatePickup( model, type, x, y, z );
    PropInfo[teamset][PropX] = x;
    PropInfo[teamset][PropY] = x;
    PropInfo[teamset][PropZ] = x;

    return 1;
}
pawn Код:
if ( pickupid == PropInfo[PROP_BUNKER1][PickupID]
        || pickupid == PropInfo[PROP_BUNKER2][PickupID]
        || pickupid == PropInfo[PROP_BUNKER3][PickupID]
        || pickupid == PropInfo[PROP_IDLEWOOD_HIDEOUT][PickupID]
        || pickupid == PropInfo[PROP_IDLEWOOD_HOUSE][PickupID]
        || pickupid == PropInfo[PROP_JEFFERSON_HIDEOUT][PickupID]
        || pickupid == PropInfo[PROP_DRUGCARTEL][PickupID]
        || pickupid == PropInfo[PROP_DRUGFACTORY][PickupID]
        || pickupid == PropInfo[PROP_DRUGHOUSEGALORE][PickupID]
        || pickupid == PropInfo[PROP_THECARTER][PickupID]
        || pickupid == PropInfo[PROP_THECARTER_TWO][PickupID] )
    {
        for(new i = 0; i < MAX_PROPS /*12*/; i++)
        {
            if ( IsPlayerInRangeOfPoint( playerid, 2.0, PropInfo[i][PropX], PropInfo[i][PropY], PropInfo[i][PropZ] ) )
            {
                if ( PropInfo[i][OwnerTeam] != TEAM_NONE ) // If a gang owns it
                {
                    format( szString, 128, "~p~property: ~w~%s~n~~p~owner:~w~ %s~n~~w~type /propcmds", PropInfo[i][Name], GetGangName(PropInfo[i][OwnerTeam]) );
                    GameTextForPlayer( playerid, szString, 5500, 3 );
                }
                else if ( PropInfo[i][OwnerTeam] == TEAM_NONE ) // If nobody owns it or been claimed by criminal justice.
                {
                    format( szString, 128, "~p~property: ~w~%s~n~~p~owner:~w~ no-one~n~~w~type /propcmds", PropInfo[i][Name] );
                    GameTextForPlayer( playerid, szString, 5500, 3 );
                }
            }
        }
I can't find a way arround, however I did some debugging and found out the script stops at this line:
pawn Код:
if ( IsPlayerInRangeOfPoint( playerid, 2.0, PropInfo[i][PropX], PropInfo[i][PropY], PropInfo[i][PropZ] ) )
I hope you can help me.
Reply


Messages In This Thread
need urgent help [rep++ in return]. - by admantis - 16.11.2011, 22:40
Re: need urgent help [rep++ in return]. - by SchurmanCQC - 16.11.2011, 22:46
Respuesta: Re: need urgent help [rep++ in return]. - by admantis - 16.11.2011, 22:48
Re: need urgent help [rep++ in return]. - by MP2 - 16.11.2011, 23:35
Respuesta: Re: need urgent help [rep++ in return]. - by admantis - 16.11.2011, 23:37
Re: need urgent help [rep++ in return]. - by admantis - 17.11.2011, 17:11
Re: need urgent help [rep++ in return]. - by admantis - 19.11.2011, 14:42
Re: need urgent help [rep++ in return]. - by playbox12 - 19.11.2011, 14:53
Respuesta: need urgent help [rep++ in return]. - by iKeN - 19.11.2011, 14:55
Re: need urgent help [rep++ in return]. - by MP2 - 19.11.2011, 15:43

Forum Jump:


Users browsing this thread: 1 Guest(s)