vehicle random spawn :D
#1

guys please help me i want to vehicle random spawns
Exsample: if one restart have sultan on one place how to make on other restart on my server to have other vehicle on the same position

Thanks for understanding

or you just can send me link of wiki... to make by my self i think this way is better to make by my self

Thanks !!!!
Reply
#2

Hi

Try checking this https://sampwiki.blast.hk/wiki/Random
and this https://sampwiki.blast.hk/wiki/Vehicles:All

Should help you with your problem
Reply
#3

Where you create the car that changes.
pawn Код:
CreateVehicle(RandomCar(), x,y,z,angle, -1,-1,respawnTime);
Anywhere at bottom of your code.
pawn Код:
stock RandomCar()
{
    switch(random(3))
    {
        case 0: return 400;
        case 1: return 401;
        case 2: return 509;
        //Just change the "return <num>" to any vehicle ID you want.
        //To add more cases, change the "random(3)" to a higher number, and add more "case:".
    }
    return 400;
}
I hope this helps you.
Greetz.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)