ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2995

How to trigger script events?

by MikeLento - 11-07-2018 - 07:10 PM
#1
Code:
void forceToDarts(int playerId)
{
    int Args[3];
    Args[0] = 3;
    Args[1] = playerId;
    Args[2] = 0x36;
    TriggerScriptEvent(Args, 3, playerId);
}
This is the code I found on df, I want to learn how to make this from scratch, I've tried everything by searching in freemode.c, I just can't figure out how to get arg 0(3) and arg 2(0x36). Any help is well appreciated.
Reply
#2
(11-07-2018 - 07:10 PM)MikeLento Wrote:
Code:
void forceToDarts(int playerId)
{
    int Args[3];
    Args[0] = 3;
    Args[1] = playerId;
    Args[2] = 0x36;
    TriggerScriptEvent(Args, 3, playerId);
}
This is the code I found on df, I want to learn how to make this from scratch, I've tried everything by searching in freemode.c, I just can't figure out how to get arg 0(3) and arg 2(0x36). Any help is well appreciated.
learn
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply
#3
Well that’s what I’m trying to do lol
Reply
#4
(11-07-2018 - 09:35 PM)MikeLento Wrote: Well that’s what I’m trying to do lol

learn c, c++ and ppc
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply
#5
MSG me on discord ItsMythicZYT#0936
Reply
#6
http://www.mediafire.com/file/nde9vgc46u...7.txt/file

Maybe the list helps
Reply
#7
Anyone knows this now

(10-20-2019 - 07:59 AM)Torxi Wrote: http://www.mediafire.com/file/nde9vgc46u...7.txt/file

Maybe the list helps

Thats just the addresses of game events, not script events
Reply
#8
(11-07-2018 - 07:10 PM)MikeLento Wrote:
Code:
void forceToDarts(int playerId)
{
int Args[3];
Args[0] = 3;
Args[1] = playerId;
Args[2] = 0x36;
TriggerScriptEvent(Args, 3, playerId);
}
This is the code I found on df, I want to learn how to make this from scratch, I've tried everything by searching in freemode.c, I just can't figure out how to get arg 0(3) and arg 2(0x36). Any help is well appreciated.
INTERSTING
Reply
#9
void TriggerScriptEvent(int* Args, int ArgCount, Player BitsetPlayer)
{
int Bitset = 0;
GAMEPLAY::SET_BIT(&Bitset, BitsetPlayer);
if (Bitset != 0)
{
Easy::TRIGGER_SCRIPT_EVENT(1, Args, ArgCount, Bitset);
}
}
Reply
#10
yes, all you need to do is call the trigger_script_event native

i hope this helps
Reply

Users browsing: 2 Guest(s)