[PED]ajuda com posto(Gasolina
#1

bom ja sei q ja fiz um topico como este mas algum infeliz apagou....
quero criar posto no interior para uma org minha ja criei o objecto no mta e agora? alguem pode me fazer a papinha feita?
Code:
CreateObject(1686, 1505.0545654297, -1701.9635009766, 13.046875, 0, 0, 0);
Reply
#2

Tambйm kero saber man ._.
Reply
#3

Define o lugar como posto de gazolina, se quiser que eu lhe explique mais aprofundado manda o sistema de posto de gazolina do seu mode...
Reply
#4

eh thug555
Reply
#5

se vc ja tem o sistema de posto e so ir la onde vc add o objeto e de /save onde vc quer que o carro pare para abastecer e depois va la no seu sistema de posto e adicione esta coordenadas com mais um if
e esse object seu coloque em OnGameModeInit
Reply
#6

pawn Code:
public IsAtGasStation(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
        {//LS
            return 1;
        }
        else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
        {//LS
            return 1;
        }
        else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
        {//SF
            return 1;
        }
        else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
        {//Between LS and SF
            return 1;
        }
        else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
        {//LV
            return 1;
        }
        else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
        {//LV
            return 1;
        }
        else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
        {//LV
            return 1;
        }
        else if(PlayerToPoint(r,playerid,x.x,y.y,.z.z) || PlayerToPoint(r,playerid,x.x,y.y,.z.z))
        {//seu posto
            return 1;
        }// Onde: x,y,z == Coordenadas de onde o cara vai abastecer e r == radi
    }
    return 0;
}
Reply
#7

Code:
 
r == radi
o que seria radi ?
Reply
#8

Radius de Distancia.
Reply
#9

no topo do gm:
pawn Code:
#define Posto1 x,y,z
no public OnPlayerCommandText(playerid, cmdtext[])
pawn Code:
//
if(strcmp(cmd, "/abastecer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInRangeOfPoint(playerid, 7.0, Posto1))
            {
                GameTextForPlayer(playerid,"~w~Gasolina!",2000,3);
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"   Vocк nгo esta num posto de gasolina!");
            }
        }
        return 1;
    }
Reply
#10

Troll mals mais nao entendi deu erro aki ontem...
Reply
#11

Quote:
Originally Posted by Xapita_Halls
View Post
Troll mals mais nao entendi deu erro aki ontem...
Faz assim oh:
pawn Code:
else if(PlayerToPoint(8.0,playerid,0000.0000,0000.0000,0000.0000) || PlayerToPoint(8.0,playerid,0000.0000,0000.0000,0000.0000))
        {//seu posto
            return 1;
        }// Onde: x,y,z == Coordenadas de onde o cara vai abastecer e r == radi

Que erros que dгo?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)