need Answer for this questions please
#1

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
Reply
#2

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,
pawn Код:
LoggedIn[playerid] = 1;

Then in each of the commands,
pawn Код:
If(LoggedIn[playerid] == 1)
{
    //Do something here
}
Reply
#3

for the VPS you should look at getting something like antctrl or similar if you aren't familiar to Linux.
Reply
#4

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)