[PEDIDO]Entrar no veiculo e ir em ChecckPoint
#9

Me ajuda a colocar isso aqui

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new carros = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        for(new i = 0; i < sizeof(Caminhoneiro); i ++)
        {
            if(carros == Caminhoneiro[i])
            {
                if(Empregos[playerid] == CAMINHONEIRO )
                {
                    SendClientMessage(playerid,-1,"Vб atй o CheckPoint para pegar a carga");
                    SetPlayerCheckpoint(playerid, 1635.424316,1594.583496,10.820312, 8.0);
                    PegarCarga[playerid] = true;
                }
            }
        }
    }
    return true;
}
Aqui dentro

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new car = GetPlayerVehicleID(playerid);//armazena na vбriavel car o carro em q ele estб.
    if(newstate == PLAYER_STATE_DRIVER)//se O Player entrar como motorista
    {
        for(new i = 0; i < sizeof(Caminhoneiro); i ++)
        {//realizara um loop na Array cars
            if(car == Caminhoneiro[i])
            {//se o carro em que vocк estб for igual б algum da array
                if(Emprego[playerid] != CAMINHONEIRO)
                {//se a profissгo do cara for diferente da citada acima
                    SendClientMessage(playerid, COR_MARROMCLARO, "[ERRO] Vocк nгo й um caminhoneiro!");
                    RemovePlayerFromVehicle(playerid);//irб removelo do carro e mandar a mensagem.
                }
            }
        }
    }
    return true;
}
To tentando aqui mais esse return ta me confundindo um pouco
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: