23.03.2010, 16:42
Sure i can.
This example is in my admin script.
It returns 1 if they are registered, and logged in; 0 if they are registered and not logged in; and -1 if they are not registered at all.
To check if a player is registered in another script, i use callremotefunction like so:
Here's the wiki page for it's syntax: CallRemoteFunction
This example is in my admin script.
Код:
// The callback HAS to be public, or there's no way CallRemoteFunction will work. forward IsPlayerRegistered(playerid); public IsPlayerRegistered(playerid) { if(pData[playerid][IsRegistered] == true) { if(pData[playerid][LoggedIn] == true) return 1; return 0; } return -1; }
To check if a player is registered in another script, i use callremotefunction like so:
Код:
if(CallRemoteFunction("IsPlayerRegistered", "i", playerid) != -1)