Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Darkness on March 26, 2009, 05:54:33 PM

Title: Ramdom Location...
Post by: Darkness on March 26, 2009, 05:54:33 PM
Hi , i need set ramdom-location... but how to create this ...
Example :

}
elseif ($3 == 432) {
  vcmp.setlocation %id $rand(-856.195 516.973 16.16,-772.914 471.326 58.243,-1035.027 1331.481 16.795)
}


is this right?
when isn't right please give me th correct command ..

P.D:Sorry my bad english  :'(  :(

Title: Re: Ramdom Location...
Post by: thijn on March 26, 2009, 07:57:12 PM
It's not right,
Try something like:

elseif ($3 == 432) {
var %rand = $rand(1,3),%loc
if (%rand == 1) %loc = -856.195 516.973 16.16
elseif (%rand == 2) %loc = -772.914 471.326 58.243
elseif (%rand == 3) %loc = -1035.027 1331.481 16.795
  vcmp.setlocation %id %loc
}
Title: Re: Ramdom Location...
Post by: Darkness on March 26, 2009, 08:17:23 PM
ok , now i go to try . Thank you thijn

Edit : Whats happen with VC-MP  i cant see my server and another one... :S
Title: Re: Ramdom Location...
Post by: Darkness on March 26, 2009, 08:27:32 PM
mmm work , but i need some... 40 ramdoms spawns how to make this?
Title: Re: Ramdom Location...
Post by: thijn on March 26, 2009, 08:38:50 PM
just add every coords at scripts, And for every coord u need to add:

elseif (%a == 1 till 40) %loc = coords

and u need to change the $rand(1,3) to $rand(1,40)
Title: Re: Ramdom Location...
Post by: Darkness on March 26, 2009, 08:48:17 PM
aa ok , thank u very much Thijn :)
Title: Re: Ramdom Location...
Post by: thijn on March 26, 2009, 10:07:14 PM
No problem ;)