mSelection with y_hooks
#1

Hi all,

I am utilising y_hooks.inc and also mSelection.inc. I'm trying to create a select menu, and I've tried to hook OnPlayerModelSelectionEx(); but I get a warning come back, and I dont particularly plan on leaving the warning. Code is below:

Код:
hook OnPlayerModelSelectionEx(playerid, response, extraid, modelid){
	//some code will go here
}
This is the warning I get:

Код:
..\include\systems\character\char_core.pwn(202) : warning 200: symbol "@yH_OnPlayerModelSelectionEx@00" is truncated to 31 characters
I know its only a warning, but there's no way in hell I'm leaving that. (I dont actually leave any warnings at all).

I understand a little bit about why the error has popped up, but does anyone know a work around for this?

Thanks
Reply
#2

If you are using YSI 4, then it's simple:
pawn Код:
DEFINE_HOOK_REPLACEMENT(Selection, Sel );
then
pawn Код:
hook OnPlayerModelSelEx(playerid, response, extraid, modelid){
    //some code will go here
}
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
If you are using YSI 4, then it's simple:
pawn Код:
DEFINE_HOOK_REPLACEMENT(Selection, Sel );
then
pawn Код:
hook OnPlayerModelSelEx(playerid, response, extraid, modelid){
    //some code will go here
}
Hi, thanks for your input. Could you explain this a little further? Where am I putting this and can you explain the parameters of 'Selection, Sel' please?:

pawn Код:
DEFINE_HOOK_REPLACEMENT(Selection, Sel );

EDIT: Nevermind..figured it out! Thanks very much for the help!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)