[AJUDA] Comando /ajustar
#1

nao consigo meter isto a dar.....
podem-me ajudar
quando eu fazo no jogo /ajustar [id] [tempo (minutos) apareзeme outra vez a dizer o mesmo "/ajustar [id] [tempo (minutos) nao tou a ver qual й o problema

PHP код:
            if(strcmp(cmd"/ajustar"true) == 0)
            {
                if(
IsPlayerConnected(playerid))
                    {
                            if(
IsACop(playerid))
                            {
                                    if(
OnDuty[playerid] != 1)
                                    {
                                        
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo Bateu o cartгo!");
                                        return 
true;
                                    }
                            if(!
PlayerToPoint(12.0playerid268.3327,77.8972,1001.0391) && !PlayerToPoint(12.0playerid1545.4073,-1607.9791,13.3828) && !PlayerToPoint(12.0playerid324.3141,-1496.9177,24.9219) && !PlayerToPoint(12.0playerid920.5212,-1184.8267,16.9766) &&  !PlayerToPoint(12.0playerid221.1459,115.3492,999.0156) && !PlayerToPoint(12.0playerid193.9101,179.2799,1003.0234) && !PlayerToPoint(12.0playerid1545.7220,-1609.4769,13.3828)
                                && !
PlayerToPoint(12.0playerid1019.6051,-317.6436,73.9922) && !PlayerToPoint(12.0playerid195.5733,158.4008,1003.0234)
                    && !
PlayerToPoint(12.0playerid, -1298.8188,490.5014,11.1953) && !PlayerToPoint(12.0playerid264.1557,77.5797,1001.0391) && !PlayerToPoint(12.0playerid1361,175.1075,1003.0234) && !PlayerToPoint(12.0playerid321.8284,315.6733,999.1484) && !PlayerToPoint(12.0playerid709.5662,-568.6655,-6.1966) && !PlayerToPoint(3,playerid,852.7875,-1275.1605,14.3879))
                                    {
// Jail spot
                                        
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo estб perto da cela, nгo pode ajustar o tempo do suspeito !");
                                        return 
true;
                                    }
                                    
tmp strtok(cmdtextidx);
                                    if(!
strlen(tmp))
                                    {
                            
SendClientMessage(playeridCOLOR_GRAD2"USE: /ajustar [id] [tempo (minutos)]");
                                            return 
true;
                                    }
                                    
giveplayerid ReturnUser(tmp);
                                    
tmp strtok(cmdtextidx);
                                    if(!
strlen(tmp))
                                    {
                            
SendClientMessage(playeridCOLOR_GRAD2"USE: /ajustar [id] [tempo (minutos)]");
                                            return 
true;
                                    }
                                    new 
time strval(tmp);
                                    if(
time || time 20) { SendClientMessage(playeridCOLOR_GREY"   O Tempo nгo pode ser menor que 1 nem maior que 20 !"); return true; }
                                    
tmp strtok(cmdtextidx);
                                    if(!
strlen(tmp))
                                    {
                                            
SendClientMessage(playeridCOLOR_GRAD2"USE: /ajustar [id] [tempo (minutos)]");
                                            return 
true;
                                    }
                                    new 
suspect giveplayerid;
                                    if(
IsPlayerConnected(suspect))
                                    {
                                    
format(stringsizeof(string), "* Vocк ajustou %s !"giveplayer);
                                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                                    
PlayerInfo[suspect][pJailTime] = time 60;
                                    
format(stringsizeof(string), "Oficial %s ajustou seu tempo de prisгo para %d Segundos."PlayerName(playerid),PlayerInfo[suspect][pJailTime]);
                                    
SendClientMessage(suspectCOLOR_LIGHTBLUEstring);
                                    }
                                    }
                            else
                            {
                                
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo й um Oficial !");
                                return 
true;
                            }
                    }
//not connected
                    
return true;
            } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)