15.07.2011, 22:09
I wanted to know how to use functions and CallLocalFunction CallRemoteFunction, can also be used in OnPlayerConnect and OnPlayerDisconnect?
public OnPlayerConnect(playerid) { if(!IsPlayerNPC(playerid)) { Streamer_AddPlayer(playerid); } if(...) { return CallLocalFunction(2964, 3064, playerid); } return 1; }
public OnPlayerDisconnect(playerid, reason) { if(!IsPlayerNPC(playerid)) { Streamer_RemovePlayer(playerid); } if(....) { return CallLocalFunction(3072, 3184, playerid, reason); } return 1; }
public OnPlayerConnect(playerid) { CallRemoteFunction("OnPlayerConnect", "i", playerid); return 1; }
example: so?
Код:
public OnPlayerConnect(playerid) { CallRemoteFunction("OnPlayerConnect", "i", playerid); return 1; } |