[PEDIDO] Comando.
#1

Bom galera eh o seguinte, queria o comando /prender id tempo motivo para os administradores.
Quem ajudar ai agradeco.
Reply
#2

SISTEMA PRISAO FS
=======================

PAWN

http://pastebin.com/Shawg1YT
Reply
#3

PHP код:
    if(strcmp(cmd"/cadeia"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /cadeia [ id ] [time(minutes)] [Motivo]");
                return 
1;
            }
            new 
target;
            
target ReturnUser(tmp);
            new 
playa;
            new 
time;
            
playa ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
time strval(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1350)
                {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/jogar)");
                return 
1;
                }
                new 
offset idx;
                new 
result[64];
                new 
length strlen(cmdtext);
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                    {
                        
result[idx offset] = cmdtext[idx];
                        
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                    {
                        
SendClientMessage(playeridCOLOR_GRAD2"USE: /cadeia [Id Do Jogador] [motivo]");
                        return 
1;
                    }
                if(
IsPlayerConnected(playa))
                {
                    if(
playa != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(playagiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
format(stringsizeof(string), "* Voce foi preso %s."giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTREDstring);
                        
format(stringsizeof(string), "* Voce foi preso pelo  Admin %s."sendername);
                        
SendClientMessage(playaCOLOR_LIGHTREDstring);
                        
ResetPlayerWeapons(playa);
                        
WantedPoints[playa] = 0;
                        
PlayerInfo[playa][pJailed] = 2;
                        
PlayerInfo[playa][pJailTime] = time*60;
                        
SetPlayerInterior(playa0);
                        
SetPlayerPos(playa107.2300,1920.6311,18.5208);
                        
SetPlayerWorldBounds(playa337.5694,101.5826,1940.9759,1798.7453);
                        
format(string256"Admin: %s ID(%d) Prendeu %s ID(%d) Por %d Minutos. Motivo: %s",sendernameplayeridgiveplayer,targettime, (result));
                        
SendClientMessageToAll(COLOR_LIGHTRED/*0x63C3F6AA*/string);
                        
format(stringsizeof(string), "Voce foi preso por %d Minutos em Praзa Publica.  Motivo: %s"time, (result));
                        
SendClientMessage(playaCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Voce nгo esta autorizado a usar este comando!");
            }
        }
        return 
1;
    } 
Ai voce so edita para acoplar em seu gm '-'
Reply
#4

Tб ae:
pawn Код:
if(strcmp(cmd, "/prisao", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid;
new Second = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "(ERRO) Use: /prisao [id]");
return 1;
}
plid = strval(tmp);
if(!IsPlayerConnected(plid)){
//SendClientMessage(playerid, Vermelho, "(ERRO) O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
new pname[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "AdmCMD: %s(%i) prendeu vocк por %d segundos.", sendername, playerid, Second);
SendClientMessage(playerid, AzuL4, string);
format(string, sizeof(string), "~g~Preso por: ~n~~r~%s.", sendername);
GameTextForPlayer(plid, string, 1000, 1);
SetPlayerInterior(plid, 3); //Se Mudar ID do Interior MUDE AQUI!
SetPlayerPos(plid, 197.6661,173.8179,1003.0234);
SetPlayerArmour(plid, 0);
TogglePlayerControllable(plid, 0);
ResetPlayerWeapons(plid);
SetTimerEx("Unjail", Second*1000, 0, "i", plid);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
format(string, sizeof(string), "[INFO]O Admin %s te prendeu.", aname);
SendClientMessage(plid, AzuL4, string);
format(string, sizeof(string), "[INFO] O Admin %s (%d) botou : %s (%d) na Cela Admin", aname,playerid,pname,plid);
SendClientMessageToAll(Verde, string);
SetPlayerHealth(plid, 99999999);
ResetPlayerWeapons(plid);
SendClientMessage(playerid, COLOR_GREEN, "[INFO] Preso com sucesso.");
SetPlayerWantedLevel(plid, 0);
preso[plid] = 1;
TogglePlayerControllable(plid, 1);
if(IsPlayerConnected(plid)){
if(Mute[playerid] == 1)
{
SendClientMessage(playerid, Vermelho, "|_INFO_|Vocк nгo pode falar na cadeia");
return 0;
}
@EDITED
(01:0 - Download do Interior 3 (Usado no Comando , pode renomear o id do interior se quiser): Clique aqui
Reply
#5

Mano em Geral em serves de RPG tem isso, uma dica para vc nгo ficar pedindo ajuda para os caras depois, Se vc quiser algum comando abaixa uns Serves de RPG Drift, etc... ae vc so precisa copiar os comandos dos outros GM e por no seu Atual
Reply
#6

http://pastebin.com/Shawg1YT
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)