Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: thijn on September 12, 2008, 11:27:12 PM

Title: timer.refresh
Post by: thijn on September 12, 2008, 11:27:12 PM
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...
Title: Re: timer.refresh
Post by: VRocker on September 13, 2008, 01:29:00 AM
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)
Title: Re: timer.refresh
Post by: thijn on September 13, 2008, 08: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??
Title: Re: timer.refresh
Post by: thijn on September 13, 2008, 11:12:17 AM
Pleas someone??
Title: Re: timer.refresh
Post by: VRocker on September 13, 2008, 02: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 :)
Title: Re: timer.refresh
Post by: Chezor on September 13, 2008, 02:08:33 PM
Quote from: thijn on September 13, 2008, 08: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
Title: Re: timer.refresh
Post by: thijn on September 13, 2008, 05:22:24 PM
Quote from: VRocker on September 13, 2008, 02: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?
Title: Re: timer.refresh
Post by: Windlord on September 14, 2008, 07:04:16 AM
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


Title: Re: timer.refresh
Post by: thijn on September 14, 2008, 11:04:14 AM
Thanks for your reply i try that.