[Ajuda] ERROS
#10

Quote:
Originally Posted by willttoonn
Посмотреть сообщение
Tente:

Код:
forward Caminhoneiro_CarregarDesc(playerid); 
public Caminhoneiro_CarregarDesc(playerid) 
{ 
    switch (PlayerData[playerid][PartedoTrabalho]) 
    { 
        case 1: 
        { 
            new StartLoc[50], EndLoc[50], Load[50], Float:x, Float:y, Float:z, UnloadMsg[100]; 
            PlayerData[playerid][PartedoTrabalho] = 2; 
            DisablePlayerCheckpoint(playerid); 
            format(StartLoc, 50, LocalCargaDescarga[PlayerData[playerid][Carregamento]][NomedoLocal]); 
            format(EndLoc, 50, LocalCargaDescarga[PlayerData[playerid][Descarregamento]][NomedoLocal]); 
            format(Load, 50, ACargas[PlayerData[playerid][CargaID]][LoadName]); 
            x = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocX]; 
            y = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocY]; 
            z = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocZ]; 
            SetPlayerCheckpoint(playerid, x, y, z, 7); 
            TogglePlayerControllable(playerid, 1); 
            SendClientMessageEx(playerid, -1, "Leve a carga de %s atй %s.", Load, EndLoc); 
        } 
        case 2: 
        { 
            new StartLoc[50], EndLoc[50], Load[50], Name[24]; 
            GetPlayerName(playerid, Name, sizeof(Name)); 
            format(StartLoc, 50, LocalCargaDescarga[PlayerData[playerid][Carregamento]][NomedoLocal]); 
            format(EndLoc, 50, LocalCargaDescarga[PlayerData[playerid][Descarregamento]][NomedoLocal]); 
            format(Load, 50, ACargas[PlayerData[playerid][CargaID]][LoadName]); 

            new Float:x1, Float:y1, Float:x2, Float:y2, Float:Distance, Message[128], Payment; 
            x1 = LocalCargaDescarga[PlayerData[playerid][Carregamento]][LocX]; 
            y1 = LocalCargaDescarga[PlayerData[playerid][Carregamento]][LocY]; 
            x2 = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocX]; 
            y2 = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocY]; 
            Distance = floatsqroot(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))); 
            Payment = floatround((Distance * ACargas[PlayerData[playerid][CargaID]][PayPerUnit]), floatround_floor); 
            RewardPlayer(playerid, Payment); 
            
            PlayerData[playerid][pDentroCaminhao] = 0; 

            SendClientMessageEx(playerid, -1, "Vocк finalizou a entrega e ganhou R$%d.", Payment); 
            TogglePlayerControllable(playerid, 1); 
            Caminhoneiro_AcabouTrabalho(playerid); 
        } 
    } 
    return 1; 
}
Desnecessбrio colocar o "Ex" no SendClientMessage, atй entгo a funзгo jб estб para o playerid.

Sinceramente, nгo vejo motivos para o seu compilador estб dando warning no "SendClientMessage", funзгo estб certa. Veja se no topo da sua GM tem:
PHP код:
#pragma tabsize 0 
, ajuda melhor a compilaзгo.
Reply


Messages In This Thread
ERROS - by RuanPereira - 27.09.2017, 05:15
Re: ERROS - by Gguiz - 27.09.2017, 06:12
Re: ERROS - by RuanPereira - 27.09.2017, 13:19
Re: ERROS - by RuanPereira - 27.09.2017, 13:29
Re: ERROS - by BrunoLuiz - 27.09.2017, 14:03
Re: ERROS - by RuanPereira - 27.09.2017, 14:29
Re: ERROS - by RuanPereira - 27.09.2017, 14:56
Re: ERROS - by willttoonn - 27.09.2017, 17:49
Re: ERROS - by RuanPereira - 27.09.2017, 21:18
Re: ERROS - by Gguiz - 27.09.2017, 22:33

Forum Jump:


Users browsing this thread: 1 Guest(s)