Post mod/code requests in the Mod Requests topic.
Post mod releases in the Mod Showroom.
Read the Modding Rules BEFORE posting!
Free mod hosting from GTANet, simply login with your GTAForums account details
GTANet's modding wiki
[BETA] GTAIV .Net ScriptHook
Posted 30 August 2013 - 05:58 PM
Posted 30 August 2013 - 07:29 PM
|QUOTE (Cyron43 @ Sunday, Apr 14 2013, 18:30)|
| Hi there,|
I'm currently writing a mod in C#.
Everything works fine but now that I like to add something that is triggered by a specific phone number I'm stuck.
I have read in your initial post that the PhoneNumberDialed event don't work on Windows 7 machines (any clue why not?).
So I tried the BindPhoneNumber method but that won't work either.
Two questions about it:
1. What convention do I have to use for the phone number string? Is it like "XYZ 555 0100"?
Do I have to use whitespaces in-between? Is the 555 sequence in the middle a must?
I guess I can use letters or numbers for the first sequence, right?
Can I use any 3-digit number from 000 to 999 for the first sequence?
Can I use any 4-digit number from 0000 to 9999 for the last sequence?
2. What else do I have to do besides using this method?
Currently all I have done for the phone handling is this piece of code (the ImmediateShutDown method is fully functional):
BTW a new PhoneDialDelegate instance is redundant so I skipped it.
Oh and I like to add: the phone numbers of the fuel mod don't work either in my game. Maybe that helps.
EDIT: I peeked into the .Net scripthook via ILSpy and found the Helper.CleanPhoneNumber method. So that clarifies my questions about the whitespaces and the letters but the other questions remain.
Anyway I wonder why nothing happens when I dial that number in the game.
Phone dial events still do not work on Windows 7! - quoting hazardx.
Have you noticed .NET Scripthook is open source ?! You don't need ILSpy, just Visual Studio.
Nothing happens because the allocation zone for the dialed number isn't the same as the one scripthook watches for.
4 user(s) are reading this topic
0 members, 4 guests, 0 anonymous users