ID:177567
![]() Aug 25 2002, 9:32 pm
|
|
im making a thing where a player has a car which is really just a players icon changed to a car, but a variable knows that he is, i need another player to be able to enter that car with him, but have the original driver maintain control, the passenger has the will to get out at any time though
|
![]() Aug 26 2002, 12:20 am
|
|
um.are you trying to copy GTAonline or something?
|
anyway try this, i dunno if it works
mob/var/incar = 0 mob/var/hascar = 0 mob/var/car = "" mob/var/follow = 0 mob/verb/car() if(usr.hascar == 1) usr <<"Your already in your car" else if(usr.incar == 1) usr <<"Your already in your car!" else if(usr.incar == 0) usr <<"You get in your car." usr.incar = 1 usr.cargive() else usr <<"You get out." usr.incar = 0 usr.icon = 'person.dmi' mob/proc/cargive() if(usr.car == "dodge viper") usr.icon = 'dv.dmi' if(usr.car == "some old car") usr.icon = 'soc.dmi' if(!usr.car) return mob/verb/get_in_car(mob/M in oview(1)) if(usr.incar == 1) usr <<"You can't enter someones car..when your in another car" else if(M.incar == 1) usr <<"You get in [M]'s car" //make em get in M <<"You hear the door to your car shut as [usr] enters." usr.incar = 1 usr.icon = 'invis.dmi' usr.follow = M usr.loc=locate(usr.x,usr.y,usr.z) usr.stay_in_car() mob/verb/get_out() if(usr.incar == 0) usr <<"Your not in a car." else usr.icon = 'person.dmi' usr.follow = null usr.incar = 0 mob proc stay_in_car() for(var/mob/M in world) if(src.follow == usr.name) src.loc = usr.loc sleep(1) src.stay_in_car() else ..() |