02.05.2010, 22:47
I'm trying to come up with a "game" thing for my GM that has random briefcases set at certain locations on the map. They are not meant to be shown but found randomly as players drive around.
I need help with it though, this is what i thought of so far.
The spawn points for the briefcases:
But i have no idea how to create a pickup for the briefcase at one of these random locations. Can someone help me edit the code so it works.
I need help with it though, this is what i thought of so far.
The spawn points for the briefcases:
pawn Код:
new Float:SpawnPoints[6][4] =
{
{2095.3445,-1806.3239,13.5515,91.7440},
{944.7471,-1807.6704,13.7675,356.9638},
{330.3860,-1515.8201,35.8672,236.2950},
{1029.5502,-1333.8390,13.5479,357.2249},
{995.1905,-1299.2383,13.3899,178.7079},
{1697.6488,1456.3223,10.7665,275.0996}
};
Код:
mypickup = CreatePickup(1210, 2, 2491.7900, -1668.1653, 13.3438, -1);
Код:
new mypickup;
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == mypickup)
{
SendClientMessage(playerid, 0xFFFFFFFF, "You received 100 dollers!");
GivePlayerMoney(playerid, 100);
}
return 1;
}
But i have no idea how to create a pickup for the briefcase at one of these random locations. Can someone help me edit the code so it works.