Random Timer
#1

He guys, I have a cool maze map for my server, but to make it even cooler I want to change walls, like every 20seconds a wall moves... well is this possible whitout doing a command all the time?
Reply
#2

You could use a 'timer function' that uses variables to know which walls he should move.
You need to be a bit experienced with timers though.

Little example:

forward ObjectTimer();
public ObjectTimer()
{
MoveObject(objectid, Float:X,Float:Y,Float:Z, Moving Speed);
return 1;
}

public OnGameModeInit()
{
SetTimer("ObjectTimer, 5000, true);
return 1;
}

This is just a minor example how to move an object in 5 seconds.
You can use 'variables' ( new ...; ) to let the script figure out where the object should move to.
Reply
#3

hmm, I don't really get, can you make it a little bit advanced please?
Reply
#4

off topic: knack looks like u have a messy, but a cool idea of your gamemode can i check it?
ip if it? and u can just add a normal timer
Reply
#5

Quote:
Originally Posted by knackworst
Посмотреть сообщение
hmm, I don't really get, can you make it a little bit advanced please?
Well, that's the most easiest way I can explain it to you..
So you should wait for another reply, else you might want to check out 'SA:MP' Wiki, loads of usefull information there!
Reply
#6

Quote:
Originally Posted by Jack Shred
Посмотреть сообщение
Well, that's the most easiest way I can explain it to you..
So you should wait for another reply, else you might want to check out 'SA:MP' Wiki, loads of usefull information there!
well it just sounds so weirdl...
moving an object whitout doing a cmd, and making sure that after a while the object returns to its place...

btw, i'm new in scripting, so that makes it extremely hard...
Reply
#7

Quote:
Originally Posted by knackworst
Посмотреть сообщение
well it just sounds so weirdl...
moving an object whitout doing a cmd, and making sure that after a while the object returns to its place...

btw, i'm new in scripting, so that makes it extremely hard...
Maybe you should try some less hard scripts for you and learn the basic ropes.
Anyway, here some SA:MP Wiki info about timers, might want to check out the 'related functions' aswell.

https://sampwiki.blast.hk/wiki/SetTimer

Good luck.
Reply
#8

Quote:
Originally Posted by knackworst
Посмотреть сообщение
well it just sounds so weirdl...
moving an object whitout doing a cmd, and making sure that after a while the object returns to its place...

btw, i'm new in scripting, so that makes it extremely hard...

@clown, lol ofc, if I finished it...
Reply
#9

Quote:
Originally Posted by knackworst
Посмотреть сообщение
@clown, lol ofc, if I finished it...
ill help you just pm me with ur ip
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)