• Welcome to Vice City Multiplayer.
 

timer.refresh

Started by thijn, September 12, 2008, 10:27:12 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

thijn

Hey all,
I want to make a script that checks if someone is at a location, ex: in the bank.
i thought something like:

timer.refresh 0 2 vcmp.chkloc(%name)

alias:


alias vcmp.chkloc {
if ((vcmp.rob.loc($1) == The Warenhouse) && ($vcmp.area($vcmp.getid($1)) != The Warenhouse)) {
vcmp.msg $vcmp.getid($1) You didnt gave the money on time. You lose $ $+ 100.
vcmp.cash- $vcmp.getid($1) 100
}
elseif ((vcmp.rob.loc($1) == The Warenhouse) && ($vcmp.area($vcmp.getid($1)) == The Warenhouse)) {
vcmp.msg $vcmp.getid($1) You gave the money just on time! You get 50% that 2500!
vcmp.cash+ $vcmp.getid($1) 2500
}
}

But this isnt working...
MIRC:
Quote* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
Why ??? ???
Not connected????
And how can i fix this problem??
Pleas help me...


VRocker

Your missing a few $'s

Any command which has brackets after is (in your case vcmp.rob.loc) should have a $ infront of it.
For example: vcmp.rob.loc($1) would become $vcmp.rob.loc($1)

It'll be the same for your timer. So it'll be
timer.refresh 0 2 $vcmp.chkloc(%name)


thijn

Sorry but its not working, thanks for you reply anyways.
now mirc gives this error:
Quote
* /timer: timer .refresh not active
How can i fix this??


thijn



VRocker

#4
tried calling it timerrefresh? cant remember if dots after the timer mess things up

Another reason ofcourse is that your forgetting to start the timer :)


Chezor

Quote from: thijn on September 13, 2008, 07:40:21 AM
Sorry but its not working, thanks for you reply anyways.
now mirc gives this error:
Quote
* /timer: timer .refresh not active
How can i fix this??

hmm isnt there a space between timer and dot (.)

* /timer: timer .refresh not active
See its timer space . refresh in your code

i think it shud be
* /timer: timer.refresh not active
timer dot refresh

Scripts: Fuel system in vehicles, Speedometer, Spawnback, Improved Copwork, Improved Jailing, Improved phone with sms, and many more. Coming soon..

thijn

Quote from: VRocker on September 13, 2008, 01:03:47 PM
tried calling it timerrefresh? cant remember if dots after the timer mess things up

Another reason ofcourse is that your forgetting to start the timer :)
eeh how can i start and how can i stop it?


Windlord

Quote* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server

It's quite interesting that it's saying that you cannot use vcmp.rob.chk as I cannot see it in your scripts.

Plus, to start a timer all you have to do is...
Code (Type this...) Select

//timer.refresh 0 2 $whatever_alias_you_need_to_use


I noticed that you are using an infinite timer for specific players.
Your $vcmp.chkloc(%name) is player specific so it would have to start a timer when the player joins then end it when the player leaves.
Code (Ending a timer) Select

/timer.refresh off



thijn

Thanks for your reply i try that.