Is there any way possible to add a function based on instances? I mean like this:
native player::CustomKick(reason) MyCustomKickFunction(player, reason);
function MyCustomKickFunction(player, reason)
{
//etc...
}
Of couse this isnt a functional code, it is just to give you an idea on what I want
for example, based on the upper code, we can call FindPlayer("NE.CrystalBlue").CustomKick("this is a example not functional");
Thanks
Click here (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=931.msg5495#msg5495)
Quote from: Fuzzie on Feb 09, 2015, 12:08 PMClick here (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=931.msg5495#msg5495)
Thanks. Btw isnt it so very similar to my example :P
function CPlayer::CustomKick( reason )
{
::Message("Player " + Name + " was kicked for " + reason);
Kick();
}
:P
Quote from: Gudio on Feb 09, 2015, 12:36 PMfunction CPlayer::CustomKick( reason )
{
....
}
:P
*cough* "
CPlayer_INTERNAL" :P And also this (http://www.squirrel-lang.org/doc/squirrel3.html#d0e1580).
was off topic so moved here (http://forum.vc-mp.org/?topic=257)