for begin
new Unregister[MAX_PLAYERS];
one player connect set it like this
SendClientMessage( playerid, COLOR_GREEN, "Your nick is not registered. Register to protect it." );
SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c register [Password]" );
Unregister[playerid] = 1; /// <<< this line
PlayerInfo[ playerid ][ Logged ] = 2;
PlayerInfo[ playerid ][ Stats ] = 2;
this is in onplayerconnect where player is not register
Unregister[playerid] = 1;
this is on onplayerspawn
if(Unregister[playerid] == 1) {
SendClientMessage(playerid,0xAA3333AA,"First Register Then Spawn use /c register password");
SetPlayerHealth( playerid, 0.0 );
}
this is in /c register cmd
Unregister[playerid] = 0;
this is help you easily get registered players
special thanks to me
note if you dont add this
Unregister[playerid] = 0;
your are not be able to spawn in game