Variable in Include
#1

PHP код:
stock IsPlayerInAnyClan(playeridvalue)
{
    if(
value[playerid] == -1) return false;
    else return 
true;

i'm using this stock in an .inc
Example use
PHP код:
new pClan[MAX_PLAYERS]; 
PHP код:
OnRegister(playeridpClan[playerid] = -1
PHP код:
if(IsPlayerInAnyClan(playeridpClan))... 
It should do
PHP код:
if(pClan[playerid] == -1) return false;
    else return 
true
But seems
Код:
IsPlayerInAnyClan(playerid, value)
Код:
value
Doesn't stock pClan

How to do it? i already tried many formats like value[], const value... nothing
Please help, thanks!
Reply
#2

I'd say, why not just do it easier way:

pawn Код:
stock IsPlayerInAnyClan(playerid)
{
    return pClan[playerid] != -1;
}

//then
IsPlayerInAnyClan(playerid)
Reply
#3

Then i have to get the pClan variable to the include from database so i have to add mysql_connect again and many shits..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)