15.11.2013, 21:30
pawn Code:
enum SpawnInfo {
Float:X,
Float:Y,
Float:Z
};
new BoughtSpawns[][SpawnInfo] =
{
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781},
{132.0000, -67.2844, 3.5781}
};
new BS[2];
pawn Code:
for(new i = 0; i < sizeof(BoughtSpawns); i++)
{
BS[!!i] = CreateDynamicPickup(1313, 1, BoughtSpawns[i][X], BoughtSpawns[i][Y], BoughtSpawns[i][Z]);
}
pawn Code:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
if(BS[0] <= pickupid <= BS[1])
{
GameTextForPlayer(playerid, "~l~~h~DO ~g~/buyspawn ~l~~h~TO BUY THIS SPAWN!", 2000, 5);
return 1;
}
return 0
}