Creating Pickups for desired coordinates. (hard to explain)
#1

Okay, sorry for my messed up title, It's hard for me to explain this.

So I have it so the script does this

pawn Код:
stock IsPlayerNearStall(playerid)
{
   
    if(IsPlayerInRangeOfPoint(playerid, 2, -315.4249,1051.4526,19.7422,245.1080,0,0,0,0,0,0) return 1; // stallcheckpoint
    else if(IsPlayerInRangeOfPoint(playerid, 2, -326.9075,1057.4795,19.7422,125.2685,0,0,0,0,0,0) return 1; // stallcheckpoint
    return 0;
}
Now the issue is I want it so it can just use these coords to create a pickup. This is how I have it.

pawn Код:
/ Stalk Markets
    CreateDynamicPickup(1239, 1, -315.4249,1051.4526,19.7422); // stallcheckpoint
    Create3DTextLabel("{FF0000}Stall\n{FFFFFF}/sbuy, /ssell", COLOR_RED, -315.4249,1051.4526,19.7422, 30, 0, 1);
    CreateDynamicPickup(1239, 1, -326.9075,1057.4795,19.7422); // stallcheckpoint
    Create3DTextLabel("{FF0000}Stall\n{FFFFFF}/sbuy, /ssell", COLOR_RED, -326.9075,1057.4795,19.7422, 30, 0, 1);
How can I make it, so it automatically does it like so

pawn Код:
CreateDynamicPickup(1239, 1, IsPlayerNearStall); // stallcheckpoint
    Create3DTextLabel("{FF0000}Stall\n{FFFFFF}/sbuy, /ssell", COLOR_RED, IsPlayerNearStall, 30, 0, 1);
    CreateDynamicPickup(1239, 1, IsPlayerNearStall); // stallcheckpoint
    Create3DTextLabel("{FF0000}Stall\n{FFFFFF}/sbuy, /ssell", COLOR_RED, IsPlayerNearStall, 30, 0, 1);
Sorry it is hard for me to explain this.... I did try searching up something.. I believe an array could be used for this, but I don't do arrays that much.
Reply


Messages In This Thread
Creating Pickups for desired coordinates. (hard to explain) - by Swyft™ - 11.09.2013, 08:13
Re: Creating Pickups for desired coordinates. (hard to explain) - by Dragonsaurus - 11.09.2013, 09:55
Re: Creating Pickups for desired coordinates. (hard to explain) - by Swyft™ - 11.09.2013, 11:56
Re: Creating Pickups for desired coordinates. (hard to explain) - by Emmet_ - 11.09.2013, 19:25

Forum Jump:


Users browsing this thread: 2 Guest(s)