[Pedido] Motivo no /carandiru
#3

Espero ter ajudado .

PHP код:
if(strcmp(cmd"/carandiru",true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
tempo[20];
            new 
tempo2;
            if(
PlayerInfo[playerid][pAdmin] < 2)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo esta autorizado para usar este comando!");
                return 
true;
            }
            
tmp strtok(cmdtextidx);
            
tempo strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /carandiru [id] [Tempo] [Motivo]");
                return 
true;
            }
            if(!
strlen(tempo))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /carandiru [id] [Tempo] [Motivo]");
                return 
true;
            }
            if(
PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1342)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode dar carandiru para um Admin Dono !");
                return 
true;
            }
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
             {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
true;
            }
            
giveplayerid ReturnUser(tmp);
            
tempo2 strval(tempo);
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[256];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(
IsPlayerConnected(giveplayerid))
            {
                if(
giveplayerid != INVALID_PLAYER_ID)
                {
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
//format(string, sizeof(string), "* Vocк Colocou o(a) %s No Carandiru.", giveplayer);
                    //SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    
format(stringsizeof(string), "Admin %s colocou %s no Carandiru, por %s minutos, Motivo: %s",PlayerName(playerid), giveplayertempo, (result));
                    
SendClientMessageToAll(0xF83100AAstring);
                    if(
admtrampando[playerid] == && admhide[playerid] == 1)
                    {
                        
SendClientMessage(giveplayeridCOLOR_LIGHTRED"* Vocк foi colocado no Carandiru Pelo Admin Chuck.");
                    }
                    else
                    {
                        
format(stringsizeof(string), "* Vocк foi colocado no Carandiru Pelo Admin %s."PlayerName(playerid));
                        
SendClientMessage(giveplayeridCOLOR_LIGHTREDstring);
                    }
                    
GameTextForPlayer(giveplayerid"~b~Bem Vindo ao ~n~~r~Carandiru"50003);
                    
ResetPlayerWeaponsEx(giveplayerid);
                    
WantedPoints[giveplayerid] = 0;
                      
SetPlayerWantedLevel(giveplayerid0);
                    
PlayerInfo[giveplayerid][pJailed] = 2;
                    
PlayerInfo[giveplayerid][pJailTime] = tempo2 60;
                    
SetPlayerPos(giveplayerid107.2300,1920.6311,18.5208);
                    
SetPlayerWorldBounds(giveplayerid337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
                
}
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"   O jogador estб offline !");
                return 
true;
            }
        }
        return 
true;
    } 
Reply


Messages In This Thread
Motivo no /carandiru - by MoitaGreen - 12.05.2013, 16:07
Re: Motivo no /carandiru - by Don_Speed - 12.05.2013, 16:11
Respuesta: Motivo no /carandiru - by Wendell - 12.05.2013, 16:13
Re: Motivo no /carandiru - by MoitaGreen - 12.05.2013, 16:17
Respuesta: Motivo no /carandiru - by Wendell - 12.05.2013, 16:32
Re: Motivo no /carandiru - by MoitaGreen - 12.05.2013, 16:32
Respuesta: Motivo no /carandiru - by Wendell - 12.05.2013, 16:36

Forum Jump:


Users browsing this thread: 3 Guest(s)