SA-MP Forums Archive
mSelection with y_hooks - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mSelection with y_hooks (/showthread.php?tid=608760)



mSelection with y_hooks - Jonesy96 - 04.06.2016

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


Re: mSelection with y_hooks - Misiur - 04.06.2016

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
}



Re: mSelection with y_hooks - Jonesy96 - 04.06.2016

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!