GMX command help
#1

this is a code I got from a filterscript and just wanted to add it to my script.. but keep getting these errors.

Код:
error 010: invalid function or declaration 
error 021: symbol already defined: "SendClientMessageEx"
error 010: invalid function or declaration
The GMX Command and Code
Код:
new
	RestartTime = 10,
	RestartTimer,
	str[512];

CMD:gmx(playerid)
{
	if(PlayerInfo[playerid][pAdmin] < 99997) {
    }
		RestartTimer = SetTimer("ServerRestartTime",1000,true);
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}

forward ServerRestartTime(playerid);
public ServerRestartTime(playerid)
{
	RestartTime--;
	if(RestartTime == 0)
	{
	    KillTimer(RestartTimer);
	    RestartTime = 10;
	    SendRconCommand("gmx");
	    return 1;
	}
	format(str,sizeof(str),"~g~Server Restart: ~r~%d",RestartTime);
	GameTextForAll(str,1150,3);
	return 1;
}
Please help me out, i'll rep
Reply
#2

Quote:
Originally Posted by aznpro12345
Посмотреть сообщение
this is a code I got from a filterscript and just wanted to add it to my script.. but keep getting these errors.

Код:
error 010: invalid function or declaration 
error 021: symbol already defined: "SendClientMessageEx"
error 010: invalid function or declaration
The GMX Command and Code
Код:
new
	RestartTime = 10,
	RestartTimer,
	str[512];

CMD:gmx(playerid)
{
	if(PlayerInfo[playerid][pAdmin] < 99997) {
    }
		RestartTimer = SetTimer("ServerRestartTime",1000,true);
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}

forward ServerRestartTime(playerid);
public ServerRestartTime(playerid)
{
	RestartTime--;
	if(RestartTime == 0)
	{
	    KillTimer(RestartTimer);
	    RestartTime = 10;
	    SendRconCommand("gmx");
	    return 1;
	}
	format(str,sizeof(str),"~g~Server Restart: ~r~%d",RestartTime);
	GameTextForAll(str,1150,3);
	return 1;
}
Please help me out, i'll rep
Change the name of your "SendClientMessageEx" function.
Reply
#3

pawn Код:
new
    RestartTime = 10,
    RestartTimer,
    str[512];

CMD:gmx(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 99997)
    {
        RestartTimer = SetTimer("ServerRestartTime",1000,true);
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}

forward ServerRestartTime(playerid);
public ServerRestartTime(playerid)
{
    RestartTime--;
    if(RestartTime == 0)
    {
        KillTimer(RestartTimer);
        RestartTime = 10;
        SendRconCommand("gmx");
        return 1;
    }
    format(str,sizeof(str),"~g~Server Restart: ~r~%d",RestartTime);
    GameTextForAll(str,1150,3);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)