[AJUDA] /celaadmin Kick + Preso
#1

Olб,

Estou hoje aqui, para pedir uma ajuda de Vocкs, Bom й o seguinte, eu estou Criando um GM e, eu queria que quando alguem Cometeзe DB jб iria direto pra Cela admin e tomava Kick, OBS : Eu ja tenho o /celaadmin, so queria conseguir por o KICK + Cela Admin pra quando o player cometeзe o DB !! e nгo consegui, entгo eu vim aqui pedir a Ajuda de Vocкs.

Meu /celaadmin :

pawn Код:
if(strcmp(cmd, "/celaadmin",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tempo[20];
            new tempo2;
            if(PlayerInfo[playerid][pAdmin] < 2)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            tempo = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /celaadmin [id] [ Tempo ]");
                return 1;
            }
            if(!strlen(tempo))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /celaadmin [id] [ Tempo ]");
                return 1;
            }
            if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar Cela ADMIN para um Admin Dono !");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tempo2 = strval(tempo);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "* Vocк Colocou o(a) %s No Cela ADMIN.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
                    {
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Vocк foi colocado no Cela ADMIN Pelo Admin Coca_Cola.");
                    }
                    else
                    {
                        format(string, sizeof(string), "* Vocк foi colocado no Cela ADMIN Pelo Admin %s.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
                    }
                    GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Cela ADMIN", 5000, 3);
                    ResetPlayerWeaponsEx(giveplayerid);
                    WantedPoints[giveplayerid] = 0;
                    SetPlayerWantedLevel(giveplayerid, 0);
                    PlayerInfo[giveplayerid][pJailed] = 2;
                    PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
                    SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
                    SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
                return 1;
            }
        }
        return 1;
    }
e o meu Cometeu DB :

pawn Код:
if(GetPlayerState(killerid) == 2)
    {
        GetPlayerName(killerid,kickname,sizeof(kickname));
        format(gstring,sizeof(gstring),"Atenзгo: {23f518} %s {f5f3f0} ID:[%d] cometeu DB em {23f518} %s {f5f3f0} e serб kickado por um admin !",kickname,killerid,PlayerName(playerid));
        SendClientMessageToAll(COLOR_YELLOW,gstring);
    }
Reply
#2

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
GetPlayerState(killerid) == 2)
    {
        
GetPlayerName(killerid,kickname,sizeof(kickname));
        
PlayerInfo[killerid][pJailed] = 2;
        
PlayerInfo[killerid][pJailTime] = 600;
        
SetPlayerPos(killerid107.2300,1920.6311,18.5208);
        
SetPlayerWorldBounds(killerid337.5694,101.5826,1940.9759,1798.7453); 
        
SendClientMessage(playerid, -1"Vocк foi preso e kickado por fazer DB !");
        
Kick(killerid);
        
format(gstring,sizeof(gstring),"Atenзгo: {23f518} %s {f5f3f0} ID:[%d] cometeu DB em {23f518} %s {f5f3f0} e serб kickado por um admin !",kickname,killerid,PlayerName(playerid));
        
SendClientMessageToAll(COLOR_YELLOW,gstring);
    }
    return 
1;

Reply
#3

Tentei por de tudo que й geito mas :

pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(7157) : warning 219: local variable "caller" shadows a variable at a preceding level
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(7838) : warning 217: loose indentation
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8087) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8089) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8093) : error 021: symbol already defined: "printf"
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8096) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8098) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8102) : error 021: symbol already defined: "printf"
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8105) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8107) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8111) : error 021: symbol already defined: "printf"
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8114) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8116) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8120) : error 021: symbol already defined: "printf"
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8123) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8125) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8129) : error 021: symbol already defined: "printf"
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8132) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8138) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8140) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8150) : error 021: symbol already defined: "ClearCrime"
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8151) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8154) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8158) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8160) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8162) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8171) : error 010: invalid function or declaration
C:\Documents and Settings\FAMILIA_\Desktop\Brasil Magic Games\gamemodes\BMG.pwn(8173) : error 010: invalid function or declaration

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


26 Errors.
Reply
#4

@Shadoww5

Obrigado manolo, consegui deu certinho eu que tava fazendo errado ali Brigadгo mesmo ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)