SA-MP Forums Archive
[PEDIDO] Vehycle Destroy - 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: [PEDIDO] Vehycle Destroy (/showthread.php?tid=275400)



[PEDIDO] Vehycle Destroy - Delete_ - 09.08.2011

tentei criar aqui mais nгo conseguiu, alguem tem ou sabe o cod de quando o player sair do veiculo, depois de 10 segundos o veiculos dar o spawn?










BRASIL MATA-MATA 2011! COMBATE EM SAN FIERRO

64.31.28.70:7780




Re: [PEDIDO] Vehycle Destroy - RockFire - 09.08.2011

pawn Код:
public OnPlayerExitVehicle(playerid,vehicleid)
{
    SetTimerEx("DestruirVeiculo",10000,false,"i",vehicleid);
    return 1;  
}

forward DestruirVeiculo(vehicleid);
public DestruirVeiculo(vehicleid) return DestroyVehicle(vehicleid);



Re: [PEDIDO] Vehycle Destroy - Shadoww5 - 09.08.2011

Use a funзгo AddStaticVehicleEx, caso eu nгo esteja enganado, e no ultimo parametro coloque, em segundos, quanto tempo que vocк quer que o veiculo der respawn apуs ser desocupado.


Re: [PEDIDO] Vehycle Destroy - Delete_ - 09.08.2011

quando o player sai do veiculo
e entra novamente
o veiculo some mesmo com o player dentro
como resolve isso?

__________________________________________________ __________________

BRASIL MATA-MATA 2011! COMBATE EM SAN FIERRO

64.31.28.70:7780




Re: [PEDIDO] Vehycle Destroy - Delete_ - 15.08.2011

up







__________________________________________________ ___________________-
BRASIL MATA-MATA 2011! COMBATE EM SAN FIERRO

64.31.28.70:7780




Re: [PEDIDO] Vehycle Destroy - MaGnO_357 - 15.08.2011

Quote:
Originally Posted by RockFire
Посмотреть сообщение
pawn Код:
public OnPlayerExitVehicle(playerid,vehicleid)
{
    SetTimerEx("DestruirVeiculo",10000,false,"i",vehicleid);
    return 1;  
}

forward DestruirVeiculo(vehicleid);
public DestruirVeiculo(vehicleid) return DestroyVehicle(vehicleid);
Tou com uma duvida tipo como posso usar um SetTimer, quando o comando usa um Variavel Exemplo:
pawn Код:
new Carro[MAX_PLAYERS];
pawn Код:
Carro[playerid] = CreateVehicle(535, Float:x, Float:y, Float:z, Angulo, random(500),random(500), 60);
Teria que ficar dessa Forma?

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimerEx("DestruirVeiculo",10000,false,"i", Carro);
    return 1;
}
pawn Код:
forward DestruirVeiculo(playerid ,vehicleid);
public DestruirVeiculo(Carro[playerid]) return DestroyVehicle(Carro[playerid]);
estб certo isso?


Re: [PEDIDO] Vehycle Destroy - RockFire - 15.08.2011

pawn Код:
new Carro[MAX_PLAYERS]; // Variбvel global (no topo)

// No comando
Carro[playerid] = CreateVehicle(535, Float:x, Float:y, Float:z, Angulo, random(500),random(500), 60);

public OnPlayerExitVehicle(playerid, vehicleid)
{
    SetTimerEx("DestruirVeiculo",10000,false,"i",Carro[playerid]);
    return 1;
}

forward DestruirVeiculo(vehicleid);
public DestruirVeiculo(vehicleid)
    return DestroyVehicle(vehicleid);

E pra dъvida do autor do tуpico

pawn Код:
public OnPlayerExitVehicle(playerid,vehicleid)
{
    SetTimerEx("DestruirVeiculo",10000,false,"i",vehicleid);
    return 1;  
}

forward DestruirVeiculo(vehicleid);
public DestruirVeiculo(vehicleid)
{
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return DestroyVehicle(vehicleid);
}



Re: [PEDIDO] Vehycle Destroy - MaGnO_357 - 15.08.2011

Vlw ai mais deu o seguinte esse:
Quote:

D:\SAMP\gamemodes\SaW2.pwn(5041) : error 035: argument type mismatch (argument 3)

pawn Код:
SetTimerEx("DestruirVeiculo",10000,"i", Carro[playerid]);// o erro aponta para essa linha
@EDIT
arrumei estava faltando o true ou False ali testei com os dois e deu certo:
pawn Код:
SetTimerEx("DestruirVeiculo",10000,"i",false, Carro[playerid]);
VLW AI


Re: [PEDIDO] Vehycle Destroy - RockFire - 15.08.2011

pawn Код:
SetTimerEx("DestruirVeiculo",10000,false,"i",Carro[playerid]);
Esqueci de um parвmetro


--------------
This forum requires that you wait 120 seconds between posts. Please try again in 71 seconds. PQP


Re: [PEDIDO] Vehycle Destroy - MaGnO_357 - 15.08.2011

sim eu tinha arruma jб mais eu coloquei true mais nгo querendo pedir de mais mais la vai

qual й a diferenзa de colocar o parвmetro true ou falso sendo que os dois funciona.

REP+ pra vc vlw por ajudar