Vice City Multiplayer

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

Title: Ramdom Location...
Post by: Darkness on March 26, 2009, 07:54:33 pm
Hi , i need set ramdom-location... but how to create this ...
Example :
Code: [Select]
}
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, 09:57:12 pm
It's not right,
Try something like:
Code: [Select]
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, 10: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, 10: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, 10:38:50 pm
just add every coords at scripts, And for every coord u need to add:
Code: [Select]
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, 10:48:17 pm
aa ok , thank u very much Thijn :)
Title: Re: Ramdom Location...
Post by: thijn on March 27, 2009, 12:07:14 am
No problem ;)