Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: javipg94 on February 10, 2008, 06:59:57 pm
-
Hai, :)
I know how to add the pickup but not how to add a function on it.
Like.. if you get the flower , it will teletransport you.. Need help :x
Thanks :D
-
Hi! This is very easy! :P :D
on *:SIGNAL:vcmp.pickup:{
var %name = $vcmp.name($1)
var %name2 = $replace($replace($vcmp.name($1),[,~),],~)
var %id = $1
if ($3 == PICKUPID) {
set %a $rand(100,200)
vcmp.cash+ %id %a
vcmp.msg %id ;example CASH PICKUP: Picked Up Cash - Amount: $ $+ %a $+ , Location: $vcmp.area(%id)
}
elseif ($3 == PICKUPID) {
%a = $rand(10,20)
vcmp.msg %id ;example DEATH PICKUP - HP Lost: %a $+ , Location: $vcmp.area(%id)
vcmp.sethp %id $calc($vcmp.hp(%id) - %a)
}
}
I hope for it I helped, if do not write then though in msn. :) :P
-
Hai :)
- Last question
I want to create 2 pickups with the ID = 107.
1pickupId 107 = DOCKS and when you pickup it ups you to the roof
2pickupId 107 = Downtown if you pickup you get armour..
if ($3 == 107) {
set %a $rand(100,200)
vcmp.cash+ %id %a
vcmp.msg %id ;example CASH PICKUP: Picked Up Cash - Amount: $ $+ %a $+ , Location: $vcmp.area(%id)
}
if ($3 == 107) {
set %a $rand(100,200)
vcmp.cash+ %id %a
vcmp.msg %id ;example CASH PICKUP: Picked Up Cash - Amount: $ $+ %a $+ , Location: $vcmp.area(%id)
}
Where to add there 1 function to the docks pickup and another function to downtown pickup?
Thanks Regards. :D
-
Javi, I know how to do it.... and I do properties to my script so why you ask these questions?