CallRemoteFunction
#1

Hello, i'm developing a minigames server. I've the core as filterscript (which handles registration, login, commands etc). I need some clarifications about CallRemoteFunction.

The minigames are a separate gamemodes. In the main FS i've the row "TotalGamesPlayed" which shows how many games a player has played, and i can increase it when i want.

Player[playerid][TotalGamesPlayed] ++;

My question is, how to use call remote function in a minigame gamemode to execute the code above?

Thanks.
Reply
#2

PHP код:
//In the main filterscript
forward UpdateGamesPlayed(playerid);
public 
UpdateGamesPlayed(playerid)
{
    
Player[playerid][TotalGamesPlayed]++;
    return 
1;
}
//In the gamemode
CMD:execute(playeridparams[])
{
    
CallRemoteFunction("UpdateGamesPlayed""i"playerid);
    return 
1;

Код:
Result: Now the value of Player[playerid][TotalGamesPlayed] which is located in the main filterscript increments by one
Reply
#3

Thank you. Repped.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)