[Bug] Help please!
#1

Hey there,I have a problem with a command on my gamemode,its /contratar which means to give a contract into a faction,anyway, every time I try to give someone a contract it says, " you are not the leader" and iv pretty much done everything but i just cant figure it out,could someone help me ? I would appreciate it a lot.


[Here is the code that I use]


PHP код:
 zcmd(contratarplayeridparams[]){
        if(
Pandilla_surenos(playerid) || Pandilla_groove(playerid) || Pandilla_ballas(playerid) || Team_nfs(playerid) || Team_Bomberos(playerid) || Mafia_yakuza(playerid) || Mafia_lcn(playerid) || Mafia_rusa(playerid) || Cartel_Medellin(playerid)){
            new 
giveplayerid;
            if(!
sscanf(params"d"giveplayerid)){
                if(
IsPlayerConnected(giveplayerid)){
                    if(
ProxDetectorS(8.0playeridgiveplayerid)){
                        if(
giveplayerid == playerid)         return    SendClientMessageEx(playeridCOLOR_GRAD2"ЎNo puedes invitarte ati mismo!"); //i cant invite myself
                        
if(Info[giveplayerid][pFMember] < 255)    return    SendClientMessageEx(playeridCOLOR_GRAD2"ЎNo puedes invitar a una persona que estб en una banda o familia!"); //i cant invite that person as he has family
                        
if(Facturing[giveplayerid] > 0)    return     SendClientMessageEx(playeridCOLOR_GRAD2"Este jugador estб en otra tarea, espera.");
                        if(
Info[giveplayerid][pMember] > || Info[giveplayerid][pLeader] > 0) return     SendClientMessageEx(playeridCOLOR_GRAD2"Este jugador ya tiene facciуn."); // this players already has a faction
                        
new string[256];
                        switch(
Info[playerid][pLeader]){
                            case 
1:     ReqF_Name[giveplayerid] = "Bomberos";
                            case 
2:     ReqF_Name[giveplayerid] = "La Cosa Nostra";
                            case 
3:     ReqF_Name[giveplayerid] = "Rusa";
                            case 
4:     ReqF_Name[giveplayerid] = "Yakuza";
                            case 
5:     ReqF_Name[giveplayerid] = "Sureсos";               //factions
                            
case 6:     ReqF_Name[giveplayerid] = "Groove";
                            case 
7:     ReqF_Name[giveplayerid] = "Ballas";
                            case 
8:     ReqF_Name[giveplayerid] = "Need For Speed";
                            case 
9:     ReqF_Name[giveplayerid] = "Cartel Medellin";
                        }
                        
ReqF_Faction[giveplayerid] = Info[playerid][pLeader];
                        
Facturing[giveplayerid] = 1;
                        
format(stringsizeof(string), "\t\tContrato\n\n\t%s te ofrece un contrato en %s\n\tїQuieres aceptarlo y pertenecer a esta organizaciуn?"GetPlayerNameEx(playerid), ReqF_Name[giveplayerid]);
                        
SafeDialogEx(giveplayeridREQF_ACCEPTDIALOG_STYLE_MSGBOX"Contrato de Trabajo"string"Aceptar""Rechazar"); //acept reject
                    
}else SendClientMessageEx(playeridCOLOR_GRAD2"Jugador muy lejos."); // player too far
                
}else SendClientMessageEx(playeridCOLOR_GRAD2"Jugador desconectado."); // player off line
            
}else SendClientMessageEx(playeridCOLOR_GRAD2"* /contratar <jugador>"); // /contract
        
}else SendClientMessageEx(playeridCOLOR_GRAD2"Usted no es lider de facciуn."); //you are not the leader
        
return 1;
    } 
Reply
#2

lol use not quote!!
Reply
#3

Updated it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)