Random spawn
#6

pawn Код:
enum Gift
{
    LocX,
    LocY,
    LocZ,
    Msg[128]
}

new Float:RandomSpawns[][Gift] =
{
    {1249.7258, -2047.9263, 59.9209, 90.2055, "King House"}, //KingHouse
    {1241.2084, -2057.6521, 60.0190, 94.9352, " Other loc"},
    {1241.0105, -2052.6873, 59.9975, 2.8144, " Other loc"}
};

public RP_SpawnGift(playerid)
{
    new Random = random(sizeof(RandomSpawns));
    new Text[128];
    CreateObject(giftbox,RandomSpawns[Random][LocX],RandomSpawns[Random][LocY],RandomSpawns[Random][LocZ],RandomSpawns[Random][4],0,0,0);
    format(Text, sizeof(Text), "Gift is found at %s", RandomSpawns[Random][Msg]);
    SendClientMessageToAll(-1, Text);
}
This shall work, untested.
Reply


Messages In This Thread
Random spawn - by Pawnie - 28.02.2014, 19:36
Re: Random spawn - by Clad - 28.02.2014, 19:42
Re: Random spawn - by Pawnie - 28.02.2014, 19:43
Re: Random spawn - by Clad - 28.02.2014, 19:46
Re: Random spawn - by Pawnie - 28.02.2014, 19:47
Re: Random spawn - by iPrivate - 28.02.2014, 20:13
Re: Random spawn - by Pawnie - 28.02.2014, 20:16

Forum Jump:


Users browsing this thread: 1 Guest(s)