[Ajuda] DynamicCP Bugado.
#3

Tente:

PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid

    new 
string[150]; 
    if(
checkpointid == CPCarregar[playerid]) 
    { 
        
DestroyDynamicCP(CPCarregar[playerid]); 
        switch(
Player[playerid][pProfissaoID]) 
        { 
            case 
0SendClientMessage(playeridCOLOR_RED"??????????????????"); 
            case 
1
            { 
                
DestroyDynamicCP(CPCarregar[playerid]); 
                new 
index random(sizeof(ALocVAR_C)); 
                new 
pay RandomPay(ALocVAR_C[index][ALOC_MIN], ALocVAR_C[index][ALOC_MAX]); 
                
format(stringsizeof(string), "[ Fleish Berg ] Leve os produtos a {FFFFFF}%s {FDFF00}localizado em {FFFFFF}%s {FDFF00}para completar a entrega."ALocVAR_C[index][ALOC_NAME], ALocVAR_C[index][ALOC_CITY]); 
                
SendClientMessage(playeridCOLOR_YELLOWstring); 
                
SetPVarInt(playerid"DinheiroEntrega_C"pay); 
                
CPDescarregar[playerid] = CreateDynamicCP(ALocVAR_C[index][ALOCX], ALocVAR_C[index][ALOCY] , ALocVAR_C[index][ALOCZ], 5.0,  -1, -1playerid STREAMER_CP_SD, -1,  0); 
            } 
        } 
    } 
    else if(
checkpointid == CPDescarregar[playerid]) 
    { 
        switch(
Player[playerid][pProfissaoID]) 
        { 
            case 
0SendClientMessage(playeridCOLOR_RED"??????????????????"); 
            case 
1
            { 
                new 
pay GetPVarInt(playerid"DinheiroEntrega_C"); 
                
DestroyDynamicCP(CPDescarregar[playerid]); 
                
SendClientMessage(playeridCOLOR_YELLOW"[ Fleish Berg ] Vocк entregou os produtos ao seu destino"); 
                
format(stringsizeof(string), "[ Fleish Berg ] Vocк ganhou {15FF00}$%d {FDFF00}como pagamento."pay); 
                
SendClientMessage(playeridCOLOR_YELLOWstring); 
                
PlayerWorking[playerid] = false
                
GivePlayerMoney(playeridpay); 
                
DeletePVar(playerid"DinheiroEntrega_C"); 
            } 
        } 
    } 
    return 
1

Se funcionar o problema estava nos dois ifs que vocк colocou, no primeiro vocк entra no checkpoint e seta o ponto de descarregar e em seguida vocк vai pra o outro if e ele diz que vocк descarregou, colocando um else if no segundo ele nгo vai ser chamado caso o primeiro tenha sido chamado, apenas caso o primeiro nгo tenha sido ele serб checado se ele й a condiзгo vбlida a ser chamada.
Reply


Messages In This Thread
DynamicCP Bugado. - by Cauezin - 18.07.2018, 18:47
Re: DynamicCP Bugado. - by Cauezin - 19.07.2018, 03:14
Re: DynamicCP Bugado. - by willttoonn - 19.07.2018, 10:38
Re: DynamicCP Bugado. - by Cauezin - 19.07.2018, 15:24
Re: DynamicCP Bugado. - by willttoonn - 19.07.2018, 16:01
Re: DynamicCP Bugado. - by Cauezin - 19.07.2018, 16:08

Forum Jump:


Users browsing this thread: 1 Guest(s)