CallRemoteFunction - Just need a run down
#1

Filterscript
pawn Код:
public OnFilterScriptInit()
{  
    CallRemoteFunction("GetAdminLevel", PlayerInfo[playerid][pAdmin]);
Gamemode
pawn Код:
public GetAdminLevel(playerid)
{
    PlayerInfo[playerid][pAdmin] = PlayerInfo[playerid][pAdmin];
    return 1;
}
I know I have done the stupidest mistake I just can't place it... :P

Cheers in advance.
Reply
#2

I don't get it, do you want it to return the admin level for the specific player?

pawn Код:
public GetAdminLevel(playerid)
{
    return PlayerInfo[playerid][pAdmin];
}
Reply
#3

Yea I am trying to get the admin level used in the gamemode into the filterscript for commands as such.
Example
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 4)
{
    SendClientMes....
Reply
#4

use this one to call the function and playbox's code.
pawn Код:
CallRemoteFunction("GetAdminLevel", "i",playerid);
Reply
#5

Ahh wicked cheers.

But how does The CallRemoteFunction save the result? or where?
Reply
#6

Test by yourself and see how it works.
pawn Код:
public OnFilterScriptInit()
{
   new anyvalue = 100,returnedvalue;
   returnedvalue = CallRemoteFunction("something", "i",anyvalue);
   printf(#%d,returnedvalue);
   return 1;
}
forward something(otherthing);
public something(otherthing)
{
    return otherthing + otherthing;
}
Reply
#7

Hahaha Nice examples. :P

Cheers all for your help, Sorry about my retardedness :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)