[Ajuda] Resolver alguns erros
#2

da uma olhada neste codigo

pawn Код:
#include <a_samp>
#include <streamer>
#include <Dini>
#include <zcmd>

//NUMEROS ORG'S
#define Taxista                                                                 0

//CORES ORG'S
#define C_Taxista                                                               0xFF0000AA

//SALARIOS
#define Salario_Taxista                                                         1500

new Profissao[MAX_PLAYERS];

main()
{
    print("\n-----------------------------------------");
    print(" Game-Mode feito por Rafael Osio de Vargas");
    print("-------------------------------------------\n");
}

public OnGameModeInit()
{
    // MOTOS SPAWN CIVIL
    CreateVehicle(462,1099.4965,-1775.7457,13.3444,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1772.7457,13.3444,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1769.7457,13.3489,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1766.7457,13.3444,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1763.7457,13.3444,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1760.7457,13.3444,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1757.7457,13.3444,90.0,129,129,60);
    CreateVehicle(462,1099.4965,-1754.7457,13.3444,90.0,129,129,60);
   
    // BICICLETAS SPAWN CIVIL
    CreateVehicle(481,1083.3788,-1754.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1757.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1760.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1763.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1766.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1769.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1772.7457,13.3444,270.0,129,129,60);
    CreateVehicle(481,1083.3788,-1775.7457,13.3444,270.0,129,129,60);
   
    // INICIO DO SERVIDOR
    SetGameModeText("Rafa Mode");
    AddPlayerClass(0,1110.3138,-1794.9937,16.5938,87.6616,0,0,0,0,0,0);
   
    //PICKUP DE ENTRADA NA PREF
    CreatePickup(1318,0,1481.1169,-1771.7590,18.7958,-1);
   
    //PICKUP DA SAIDA DA PREF
    CreatePickup(1318,0,389.9258,173.9278,1008.3828,-1);

    //DESABILITA A SETINHA AMARELA NA ENTRADA DOS INTERIORES
    DisableInteriorEnterExits();   
    return 1;
}

// COMANDOS
CMD:profissao(playerid)
{
    if(Profissao[playerid] == TAXISTA)
        SendClientMessage(playerid,cor_cinza,"VC E TAXISTA");
       
    else SendClientMessage(playerid,cor_cinza,"VC NUM E TAXISTA");
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

    //APERTAR F PARA ENTRAR/SAIR DA PREF
    if ((newkeys==KEY_SECONDARY_ATTACK))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,1481.1484,-1770.3508,18.7958))
        {
            SetPlayerInterior(playerid, 3); // Interior Do Local que Serб Setado.
            SetPlayerPos(playerid,387.6299,173.7600,1008.3828); // Setando ele Para Dentro do Interior.
        }
        // else if.......
    }
   
    //APERTAR F PARA ENTRAR/SAIR DA PREF
    if ((newkeys==KEY_SECONDARY_ATTACK))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0,389.9258,173.9278,1008.3828))
        {
            SetPlayerInterior(playerid, 0); // Interior Do Local que Serб Setado.
            SetPlayerPos(playerid,1480.7925,-1767.8843,18.7958); // Setando ele Para Dentro do Interior.
        }
    }
    return 1;
}
recomendo usar zcmd ou ycmd para os comandos de qualquer forma apliquei zcmd.

olha o link da include: forum.sa-mp.com/showthread.php?t=91354
Reply


Messages In This Thread
Resolver alguns erros - by RafaelOsio - 08.06.2014, 14:10
Re: Resolver alguns erros - by PT - 08.06.2014, 14:26
Re: Resolver alguns erros - by RafaelOsio - 08.06.2014, 14:32
Re: Resolver alguns erros - by KILERTRANSUDO - 08.06.2014, 14:34
Re: Resolver alguns erros - by RafaelOsio - 08.06.2014, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)