Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » How to Turn the Ped on after a specific time
Re: How to Turn the Ped on after a specific time [message #451266 is a reply to message #451263] Thu, 11 August 2011 11:45 Go to previous messageGo to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
Registered: July 2006
Location: USA
Karma:
General (3 Stars)
iRANian wrote on Thu, 11 August 2011 12:24

With the Get_Total_Bullets() check I don't restart the timer if the guy if the guy doesn't have any of the beacons, or if the ammo count for it is zero.


You need to stop updating your code, its just making a confusing mess out of this discussion, it was 0.5, removing and granting the weapon still doesn't get around the crash as if the player is holding it they get left holding nothing, you have to do a select before you remove a weapon they are holding.

iRANian wrote on Thu, 11 August 2011 12:24


The reason the timer repeats every 0.1 secs is because the FDS crashes when the beacon is being deployed while you remove it.


You can remove any weapon, even if its being deployed, as long as you select another weapon first, only issue is if you switch and then remove a weapon while the player is scoping, then they are stuck in scope until they get a weapon that has a scope.

iRANian wrote on Thu, 11 August 2011 12:24


I'll take a look if your Select_Weapon() method works with a timer that repeats every 1, 2 or 3 seconds, which well mean that the performance penalty is greatly reduced.

It does, but you are going to have to do it faster than 3 seconds for sure, play rp2, it fires that code off while swimming more than 10 times a second. I would say you could even do it 100 times a second if you like, but 0.01 doesn't' actually time to be that...

iRANian wrote on Thu, 11 August 2011 12:24


Most standard libraries implements stricmp() as doing upper-casing for both string and then applying strcmp().

Which just means it doesn't check for null strings and tries to compare the first char of both strings even if one is null.


In the end, the best way to do this is still move the beacon zones off the map and not interfere with the player at all.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need someone familiar with vehicle boning
Next Topic: Having some issues modifying the Airstrip waypoints serverside
Goto Forum:
  


Current Time: Sun Dec 29 10:22:32 MST 2024

Total time taken to generate the page: 0.01130 seconds