Author Topic: timer.refresh  (Read 5492 times)

0 Members and 1 Guest are viewing this topic.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
timer.refresh
« on: September 13, 2008, 12:27:12 am »
Hey all,
I want to make a script that checks if someone is at a location, ex: in the bank.
i thought something like:
Code: [Select]
timer.refresh 0 2 vcmp.chkloc(%name)
alias:
Code: [Select]

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...
« Last Edit: September 13, 2008, 01:15:57 am by thijn »

Offline VRocker

  • LU Developer
  • Wiseguy
  • *
  • Posts: 63
    • View Profile
    • Liberty Unleashed - GTA3 Multiplayer Mod
Re: timer.refresh
« Reply #1 on: September 13, 2008, 02: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
Code: [Select]
timer.refresh 0 2 $vcmp.chkloc(%name)


Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: timer.refresh
« Reply #2 on: September 13, 2008, 09: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??

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: timer.refresh
« Reply #3 on: September 13, 2008, 12:12:17 pm »
Pleas someone??

Offline VRocker

  • LU Developer
  • Wiseguy
  • *
  • Posts: 63
    • View Profile
    • Liberty Unleashed - GTA3 Multiplayer Mod
Re: timer.refresh
« Reply #4 on: September 13, 2008, 03: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 :)
« Last Edit: September 13, 2008, 03:08:11 pm by VRocker »


Offline Chezor

  • Wiseguy
  • **
  • Posts: 90
  • RPG Planet Scripter
    • View Profile
    • RPG Planet
Re: timer.refresh
« Reply #5 on: September 13, 2008, 03:08:33 pm »
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 (.)

Code: [Select]
* /timer: timer .refresh not activeSee its timer space . refresh in your code

i think it shud be
Code: [Select]
* /timer: timer.refresh not activetimer dot refresh

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

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: timer.refresh
« Reply #6 on: September 13, 2008, 06:22:24 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

  • Guest
Re: timer.refresh
« Reply #7 on: September 14, 2008, 08: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


Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: timer.refresh
« Reply #8 on: September 14, 2008, 12:04:14 pm »
Thanks for your reply i try that.