16.11.2011, 22:40
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:
And how I create the pickups:
I can't find a way arround, however I did some debugging and found out the script stops at this line:
I hope you can help me.
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];
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 );
}
}
}
pawn Код:
if ( IsPlayerInRangeOfPoint( playerid, 2.0, PropInfo[i][PropX], PropInfo[i][PropY], PropInfo[i][PropZ] ) )