need Answer for this questions please -
IbeatS - 22.02.2014
First one is :I want the server reserved all commands until the player register or login ,cuz the commands work if he didn't login
Second: if I got a VPS ,How to change the players slots and if the server closed ,how to open it or how to restart it
Re: need Answer for this questions please -
Ryan_Undering - 22.02.2014
Quote:
Originally Posted by IbeatS
First one is :I want the server reserved all commands until the player register or login ,cuz the commands work if he didn't login
Second: if I got a VPS ,How to change the players slots and if the server closed ,how to open it or how to restart it
|
I suppose for the commands, you could do for example;
pawn Код:
static LoggedIn[MAX_PLAYERS];
Then once they've logged in,
Then in each of the commands,
pawn Код:
If(LoggedIn[playerid] == 1)
{
//Do something here
}
Re: need Answer for this questions please -
Mattakil - 22.02.2014
for the VPS you should look at getting something like antctrl or similar if you aren't familiar to Linux.
Re: need Answer for this questions please -
Scenario - 23.02.2014
Well, for the first one, it kind of depends on which command processor you're using. If you're using the standard, OnPlayerCommandText(), I think this would work:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(pLogged[playerid] == false)
return SendClientMessage(playerid, COLOR_RED, "ERROR: You aren't logged in yet, moron!");
return 0;
}
If you're using ZCMD/y_commands, you could do this:
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(pLogged[playerid] == false)
return SendClientMessage(playerid, COLOR_RED, "ERROR: You aren't logged in yet, moron!"), 0;
return 1;
}
As for the second thing: just learn how to use SSH to start/stop the server, and how to use "nano" to edit the server.cfg.
Re: need Answer for this questions please -
IbeatS - 26.02.2014
i used the second one but it make errors
C:\Documents and Settings\aa\My Documents\Downloads\Compressed\samp03z_svr_R1_win3 2\gamemodes\BMRP.pwn(29018 ) : error 029: invalid expression, assumed zero
C:\Documents and Settings\aa\My Documents\Downloads\Compressed\samp03z_svr_R1_win3 2\gamemodes\BMRP.pwn(29018 ) : error 055: start of function body without function header
C:\Documents and Settings\aa\My Documents\Downloads\Compressed\samp03z_svr_R1_win3 2\gamemodes\BMRP.pwn(29018 -- 29026 ) : error 021: symbol already defined: "dcmd_changepass"
C:\Documents and Settings\aa\My Documents\Downloads\Compressed\samp03z_svr_R1_win3 2\gamemodes\BMRP.pwn(29018 -- 29026) : fatal error 107: too many error messages on one line