[NEED HELP] Have main game-mode script work in a filterscript
#5

Quote:
Originally Posted by AlfaSufaIndo
Посмотреть сообщение
maybe you can use stock.. don't use public, and you don't have to use CallRemoteFunction if you using stock

PHP код:
stock IsPlayerGod(TargetID)
{
    return (
godMode[TargetID]);

-CMIIW
I've heard that stocks should be only used when writing includes or filterscripts and they should not be written down at the main gamemode, thanks a lot for the suggestion but I think I will try something else.

Again, thanks a lot for your reply- but I want to use the "CallRemote" built-in function and not use PVar or something like that.


Quote:
Originally Posted by nG Inverse
Посмотреть сообщение
Ignore all of those suggestions! CallRemoteFunction is correct and will require your function be declared public.

pawn Код:
CallRemoteFunction("IsPlayerGod", "i", playerid);
Also since the function is called externally, and uses a passed index to directly access an array, you should add some bounds checking.
I didn't really understand what did you mean with the bounds checking, but- I'll try re-constructing my code a bit and will update soon, thank you for your suggestion!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)