Command problem
#1

Hello!

On my server when I type a command like /stats or something the server shut down immediately.
How can I fix it?
Thanks
Reply
#2

Type here your code, then all clear will be.
Reply
#3

show you /stats command
This forum requires that you wait 120 seconds between posts. Please try again in 20 seconds.
Reply
#4

Look at your code, it might crashed for something worng there is on this.
Reply
#5

This is my OnPlayerCommandText:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new x_job[256];
	new string[256];
	new playermoney;
	if(AdminDuty[playerid] == 1) SetPlayerChatBubble(playerid, "Admin szolgбlatban", COLOR_LIGHTBLUE,20,1200);
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new cmd[256];
	new tmp[256];
	new giveplayerid, moneys, idx;
	new idcar = GetPlayerVehicleID(playerid);
	new rapstyle, wankstyle, stripstyle, dancestyle, sexstyle, bjstyle;
	cmd = strtok(cmdtext, idx);

    GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
	format(string, sizeof(string), "%s: ID:%d  CMD: %s", giveplayer, playerid, cmdtext);
	CMDLog(string);

    if(RegistrationStep[playerid] > 0)
    {
        SmallLifeMessage(playerid, COLOR_LIGHTRED, " Nem tudod ezt csinбlni jelenleg !");
		return 1;
    }

    if(BenchPresses[playerid] != 0)
	{
	    SmallLifeMessage(playerid, COLOR_LIGHTRED, "Nem tudod hasznбlni ezt amikor padon vagy.");
		return 1;
	}
Reply
#6

So what I need to do to fix it?
Reply
#7

You have a infinite loop in your script, try removing this

pawn Код:
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "%s: ID:%d  CMD: %s", giveplayer, playerid, cmdtext);
    CMDLog(string);
Reply
#8

And If i remove what it does?

I removed but it keeps shutting down ;(
Reply
#9

It should remove the loop, if there is one, just try..
Reply
#10

I removed but it keeps shutting down ;(
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)