SA-MP Forums Archive
[Ajuda] /su - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /su (/showthread.php?tid=340516)



[Ajuda] /su - ' Bigode - 07.05.2012

Ola queria que quando alguem desse su aparecesse assimm la pros cop : /su th = Tentativa de homicideo Nao apenas o th ou qualker otra coisa que o cara digita no /su
Codigo /su :

PHP код:
if(strcmp(cmd"/suspeito"true) == || strcmp(cmd"/su"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
             if(!
IsACop(playerid))
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo й um policial!");
                return 
1;
            }
            if(
OnDuty[playerid] != 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo Bateu o cartгo!");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: (/su)speito [id] [Descriзгo do Crime]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if (
IsACop(playerid))
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                     if(
IsACop(giveplayerid))
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo pode dar su em Policiais!");
                        return 
1;
                    }
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                            
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            new 
length strlen(cmdtext);
                            while ((
idx length) && (cmdtext[idx] <= ' '))
                            {
                                
idx++;
                            }
                            new 
offset idx;
                            new 
result[64];
                            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: (/su)speito [id] [Descriзгo do Crime]");
                                return 
1;
                            }
                            
SetPlayerCriminal(giveplayerid,playeridresult);
                            return 
1;
                    }
                }
                else
                {
                        
SendClientMessage(playeridCOLOR_GRAD1"  Esse jogador nгo estб conectado.");
                        return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD2"   Vocк nгo й um Policial !");
            }
        }
        return 
1;
 } 
Otro cod pra por
PHP код:
if(Player[playerid][pLeader] == TEAM_PM || Player[playerid][pLeader] == TEAM_PF || Player[playerid][pLeader] == TEAM_FA || Player[playerid][pLeader] == TEAM_PREF || Player[playerid][pLeader] == TEAM_Detran || Player[playerid][pLeader] == TEAM_BOPE || Player[playerid][pMember] == TEAM_PM || Player[playerid][pMember] == TEAM_PF || Player[playerid][pMember] == TEAM_FA || Player[playerid][pMember] == TEAM_Detran || Player[playerid][pMember] == TEAM_BOPE)
        {
            if(
IsPlayerConnected(giveid))
            {
                if(
giveid != INVALID_PLAYER_ID)
                {
                    new 
result[128];
                    
format(result,128,"%s"params[strlen(tmp)+1]);
                    if(!
strlen(result))
                        return 
SendClientMessage(playeridCOLOR_GREY"[USO] (/su)speito [id/nick] [descricгo crime]");
                    if(
Player[giveid][pJailed] > && strcmp(result,"AP",true) != 0){SendClientMessage(playeridCOLOR_RED"[ERRO] O jogador jб estб preso!");return 1;}
                    if(
strcmp(result,"AP"true) == 0) { result "Ajuste de pena"; }
                    else if(
strcmp(result,"DOP"true) == 0) { result "Desobediкncia a ordem policial"; }
                    else if(
strcmp(result,"TH"true) == 0) { result "Tentativa de homicнdio"; }
                    else if(
strcmp(result,"CA"true) == 0) { result "Contrabando de armas"; }
                    else if(
strcmp(result,"CD"true) == 0) { result "Contrabando de drogas"; }
                    else if(
strcmp(result,"RV"true) == 0) { result "Roubo de Veнculo"; }
                    else if(
strcmp(result,"RM"true) == 0) { result "Rejeicгo de multa"; }
                    else if(
strcmp(result,"RP"true) == 0) { result "Resistencia a prisгo"; }
                    else if(
strcmp(result,"ILR"true) == 0) { result "Invasгo a Local Restrito"; }
                    else if(
strcmp(result,"RMD"true) == 0) { result "Rejeicгo a Mostrar Documentos"; }
                    else if(
strcmp(result,"DA"true) == 0) { result "Desacato б Autoridade"; }
                    else if(
strcmp(result,"PIA"true) == 0) { result "Porte Ilegal de Armas"; }
                    else if(
strcmp(result,"CF"true) == 0) { result "Cumplice de Fugas"; }
                    else if(
strcmp(result,"CS"true) == 0) { result "Cumplice de Sequestro"; }
                    else if(
strcmp(result,"CR"true) == 0) { result "Cumplice de Roubo"; }
                    else{
SendClientMessage(playeridCOLOR_RED"[ERRO] SU inexistente!");return 1;}
                    if(
WantedPoints[giveid] == 0)
                         
WantedPoints[giveid] += 1;
                    else
                        
WantedPoints[giveid]+= 1;
                    
SetPlayerCriminal(giveid,playeridresult);
                    return 
1;
                }
            }
            else
                return 
SendClientMessage(playeridCOLOR_RED"[ERRO] Jogador nгo encontrado.");
        }
        else
            
SendClientMessage(playeridCOLOR_RED"[ERRO] Vocк nгo й PM / PF / FA / BOPE.");
        return 
1;
    } 



Re: [Ajuda] /su - sanalex - 07.05.2012

Explique direito .


Re: [Ajuda] /su - kinhobryant - 07.05.2012

Ele quer que quando digitasse /su id th aparecesse , Suspeito .... Tentativa de Homicidio creio eu ;s


Re: [Ajuda] /su - ' Bigode - 07.05.2012

isso ai que o kinho falo