Random spawn object
#1

Hello guys, im new scripteur (writer) and i need help.

I have started scripting a server and I am looking for spawn objects at different locations with a timer.

Do as a random spawn for a character except with an object. I can not find any tutorials. Sorry for my bad english im french, good afternoon !
Reply
#2

Hmmm, maybe this can help you?:
Код:
//After the last #include
#define CreateRandomObject() CreateObject(random(3399), RandomFloat(), RandomFloat(), RandomFloat(), RandomFloat(), RandomFloat(), RandomFloat())
//At the bottom of the script
Float:RandomFloat()
{
    new Float:rand = random() \ (random() % random() )
    return rand;
}
How to use it? Use CreateRandomObject() to spawn a random object in a random place in the map.
Hope I helped you. Or in french: "J'espиre que je t'ai aidй".
Reply
#3

I go test this tonight , thanks for your fast reply. I'll tell you if it works tonight, thanks you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)