SA-MP Forums Archive
[AJUDA] Pegar carro pelo Alt - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Pegar carro pelo Alt (/showthread.php?tid=292733)



[AJUDA] Pegar carro pelo Alt - Oakley_TwOPaCk - 24.10.2011

Galerб, estou querendo aprender fazer um comando que й assim :

O servido ta sem carro (elegy) dai o carra vai la e aperta Alt, dai apareзe um Elegy e ele dentro do elegy pronto pra andar ... Mais quero aprender tbm Se poderem ajudar por favor ^^ e que quando ele faзa outro aquele q ele tinha criado sumisse ! pra nгo ficar cheio de elegy .. Obrigado


Re: [AJUDA] Pegar carro pelo Alt - [O.z]Caroline - 24.10.2011

pawn Код:
if(newkeys & 1)
{
    if(IsPlayerInAnyVehicle(playerid)) return true;
    new Float:x, Float:y, Floatz;
    GetPlayerPos(playerid, x,y,z);
    PutPlayerInVehicle(playerid, CreateVehicle(512, x,y,z, 0.0, -1, -1, 9999999999), 0);
}



Re: [AJUDA] Pegar carro pelo Alt - Oakley_TwOPaCk - 24.10.2011

pawn Код:
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(495) : error 017: undefined symbol "newkeys"
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(499) : error 017: undefined symbol "z"
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(500) : error 017: undefined symbol "z"
C:\Documents and Settings\FAMILIA_\Desktop\Iniciante\gamemodes\testing.pwn(498) : warning 203: symbol is never used: "Floatz"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.



Re: [AJUDA] Pegar carro pelo Alt - [O.z]Caroline - 24.10.2011

bota isto no OnPlayerKeyStateChange
pawn Код:
if(newkeys & 1)
{
    if(IsPlayerInAnyVehicle(playerid)) return true;
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x,y,z);
    PutPlayerInVehicle(playerid, CreateVehicle(512, x,y,z, 0.0, -1, -1, 9999999999), 0);
}



Re: [AJUDA] Pegar carro pelo Alt - Oakley_TwOPaCk - 24.10.2011

eei carol brigadгo funfo, soque Nгo й pelo alt '-' й pelo tabata oq eu faзo pra por pelo alt ? [Alt][Space][Alt Gr]

Quero o [Alt]

e quando cria o veiculo e sai, e cria dinovo o outro continua la, queria q ele resetase Tipo : Criei o veiculo, se eu criar outro, oq eu tinha criado sumisse '-'


Re: [AJUDA] Pegar carro pelo Alt - [O.z]Caroline - 24.10.2011

No Topo:
pawn Код:
new MyCar[MAX_PLAYERS];

pawn Код:
if(newkeys & 1)
{
    if(IsPlayerInAnyVehicle(playerid)) return true;
    if(MyCar[playerid] != -1) DestroyVehicle(MyCar[playerid]);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x,y,z);
    MyCar[playerid] = CreateVehicle(512, x,y,z, 0.0, -1, -1, 9999999999);
    PutPlayerInVehicle(playerid, MyCar[playerid], 0);
}



Re: [AJUDA] Pegar carro pelo Alt - Oakley_TwOPaCk - 24.10.2011

Aew carol vc й 10 Garota !! Funfo certim, mais como eu faзo pra criar com a Tecla [Alt] do teclado ? Ta ino apenas com a Tecla Tabta ?


Re: [AJUDA] Pegar carro pelo Alt - [O.z]Caroline - 24.10.2011

nгo й possнvel a tecla ALT apй.



Re: [AJUDA] Pegar carro pelo Alt - Oakley_TwOPaCk - 24.10.2011

Como eu faзo pra por a Tecla F ?


Re: [AJUDA] Pegar carro pelo Alt - [O.z]Caroline - 24.10.2011

pawn Код:
if(newkeys & 16)
{
    if(IsPlayerInAnyVehicle(playerid)) return true;
    if(MyCar[playerid] != -1) DestroyVehicle(MyCar[playerid]);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x,y,z);
    MyCar[playerid] = CreateVehicle(512, x,y,z, 0.0, -1, -1, 9999999999);
    PutPlayerInVehicle(playerid, MyCar[playerid], 0);
}