Preston4321 Posted October 26, 2005 Share Posted October 26, 2005 (edited) Ok heres wut the problem is, when I enter the vehicle it just sas LastDriver: . even tho ive alread been in the car and stuff, now heres wut ive made: The alies for calling it by $rpg.lastdriver and im not sure if it would be $rpg.lastdriver with the ($1,$2) at the end or not couse realy i dont know wut the $1 $2 $3 $4 mean: alias rpg.lastdriver !return $iff($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),No-One) The writeini for when you exit the vehicle it will add it to the ini: !writeini -n " $+ $rpg.dir $+ rpg.data.ini" lastdriver $mta.vehicle($1,$2) $mta.name($1,$2) The thing of wut it sas when you enter the car (*NOTE I did not add the whole mta.msg and rest of this part because I have added stuff I realy dont want out): LastDriver: $rpg.lastdriver Edited October 26, 2005 by Guest Link to comment
MrJax Posted October 26, 2005 Share Posted October 26, 2005 alias rpg.lastdriver !return $iff($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),No-One) ...can be changed to... alias rpg.lastdriver !return $iff($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$v1,No-One) ..but it should work ok, so unless your name in MTA name is ".", i don't have a clue Link to comment
Preston4321 Posted October 26, 2005 Author Share Posted October 26, 2005 thx man ill try it now. Link to comment
Preston4321 Posted October 26, 2005 Author Share Posted October 26, 2005 nope it dosnt work if sombody can please help me thx. Link to comment
andeh Posted October 26, 2005 Share Posted October 26, 2005 use: $rpg.lastdriver($1,$2) Link to comment
Preston4321 Posted October 26, 2005 Author Share Posted October 26, 2005 ok let me try... ok heres wut im still getting ** Admin PM send: Vehicle: Deluxo -Price: $1642 Vehicle Health: 68% [|||||||]. LastDriver: . Owner: Nobody Link to comment
andeh Posted October 27, 2005 Share Posted October 27, 2005 post all of the script related to it here. So i can see whats wrong.. Link to comment
Preston4321 Posted October 28, 2005 Author Share Posted October 28, 2005 alias part: alias rpg.lastdriver !return $iff($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$v1,No-One) MTA Signal enter part were i call it: } else mta.msg $1 $2 Vehicle: $mta.vehicle($1,$2).name -Price: $chr(36) $+ $rpg.carprice($1,$2) Vehicle Health: $mta.health($1,$2).vehicle $+ $chr(37) $chr(91) $+ $str(|,$ceil($calc($mta.health($1,$2).vehicle /10))) $+ $chr(93) $+ . LastDriver: $rpg.lastdriver($1,$2) . Owner: Nobody } Finaly the MTA Signal Exit Part: on *:SIGNAL:mta.exit:{ !writeini -n " $+ $rpg.dir $+ rpg.data.ini" lastdriver $mta.vehicle($1,$2) $mta.name($1,$2) $+(!.timerkill,.,$1,.,$2) off if $calc($rpg.petrol($1,$3) - $calc($calc($ctime - $rpg.entertime($1,$3)) / 10)) < 0 { !writeini -n " $+ $rpg.dir $+ rpg.data.ini" petrol $3 0 } else !writeini -n " $+ $rpg.dir $+ rpg.data.ini" petrol $3 $calc($rpg.petrol($1,$3) - $calc($calc($ctime - $rpg.entertime($1,$3)) / 10)) } Link to comment
andeh Posted October 28, 2005 Share Posted October 28, 2005 looking quickly the problem seems to be this: alias rpg.lastdriver !return $iff($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$v1,No-One) your iif is wrong... So it should be: alias rpg.lastdriver !return $iif($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),No-One) Link to comment
Preston4321 Posted October 28, 2005 Author Share Posted October 28, 2005 lol thx man becasue somtimes I-R-NOOB! Link to comment
zerb Posted October 28, 2005 Share Posted October 28, 2005 Not just that what you said about yourself but everyone needs to learn something to get better at it. Link to comment
Preston4321 Posted October 29, 2005 Author Share Posted October 29, 2005 ok well its working now but it just says No-One even when me and my friend tested it. We both went into a vehicle and then got out then went into the other vehicle and it still said No-One. if you could help me thx. Link to comment
andeh Posted October 29, 2005 Share Posted October 29, 2005 that should work, check the INI see if its writing properly... Link to comment
MrJax Posted October 29, 2005 Share Posted October 29, 2005 looking quickly the problem seems to be this: alias rpg.lastdriver !return $iff($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$v1,No-One) your iif is wrong... So it should be: alias rpg.lastdriver !return $iif($readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),$readini($rpg.dir $+ rpg.data.ini,lastdriver,$mta.vehicle($1,$2)),No-One) Um, if you read up, that 1st line is the one i just gave him, which is fine, and he was getting the same problem with both.. Link to comment
Preston4321 Posted October 30, 2005 Author Share Posted October 30, 2005 idk wuts wrong with it im just gonna close this project if anybody figures it out and gets it working if you could please tell me thx. Link to comment
Recommended Posts