Add timers if you leave vehicles, how? -
MastahServers - 03.06.2010
How to add a timer, into OnPlayerExitVehicle if he leaves a car for 5 seconds, it gets destroyed
Re: Add timers if you leave vehicles, how? -
DJDhan - 03.06.2010
Ooh i thought it would work :P
Re: Add timers if you leave vehicles, how? -
MastahServers - 03.06.2010
Quote:
Originally Posted by DJDhan
Under OnPlayerExitVehicle(playerid,vehicleid)
Код:
SetTimer("DestroyVehicle",5000,0);
|
It doesn't get destroyed
Re: Add timers if you leave vehicles, how? - WackoX - 03.06.2010
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimerEx("DeleteVehicle", 5000, false, "d", vehicleid);
return 1;
}
forward DeleteVehicle(vehicleid);
public DeleteVehicle(vehicleid)
{
DestroyVehicle(vehicleid);
}
Re: Add timers if you leave vehicles, how? -
shady91 - 03.06.2010
wrong, I would do something like
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimerEx("delcar", 5000, 0, "i", vehicleid)
return 1;
}
forward delcar(vehicleid);
public delcar(vehicleid)
{
DestroyVehicle(vehicleid);
//or
SetVehicleToRespawn(vehicleid);
return 1;
}
EDIT: I wasn't talking to you WackoX, You posted a few seconds before me I didn't see your post.
Re: Add timers if you leave vehicles, how? -
Jefff - 03.06.2010
exit
Код:
SetTimerEx("DestroyVeh",5000,0,"dd",playerid,vehicleid);
Код:
forward DestroyVeh(p,v);
public DestroyVeh(p,v)
{
if(!IsPlayerInVehicle(p,v)){
DestroyVehicle(v);
}
return 1;
}
Re: Add timers if you leave vehicles, how? - WackoX - 03.06.2010
Quote:
Originally Posted by Shady91
wrong, I would do something like
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid) {
SetTimerEx("delcar", 5000, 0, "i", vehicleid) return 1; }
forward delcar(vehicleid); public delcar(vehicleid) { DestroyVehicle(vehicleid); //or SetVehicleToRespawn(vehicleid); return 1; }
|
You are wrong;
* He said the car has te be destroyed, you destroy and respawn them.
* You don't have to destroy a car that would be respawned, unuseless.
* You have no idea of identation.
EDIT: Still i stay with my point of view.
---
Quote:
Originally Posted by Jefff
exit
Код:
SetTimerEx("DestroyVeh",5000,0,"dd",playerid,vehicleid);
Код:
forward DestroyVeh(p,v);
public DestroyVeh(p,v)
{
if(!IsPlayerInVehicle(p,v)){
DestroyVehicle(v);
}
return 1;
}
|
WTF, if he get's out of a vehicle how the hell would he be in it.
Re: Add timers if you leave vehicles, how? -
MastahServers - 03.06.2010
Quote:
Originally Posted by WackoX
Quote:
Originally Posted by Shady91
wrong, I would do something like
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid) {
SetTimerEx("delcar", 5000, 0, "i", vehicleid) return 1; }
forward delcar(vehicleid); public delcar(vehicleid) { DestroyVehicle(vehicleid); //or SetVehicleToRespawn(vehicleid); return 1; }
|
You are wrong;
* He said the car has te be destroyed, you destroy and respawn them.
* You don't have to destroy a car that would be respawned, unuseless.
* You have no idea of identation.
EDIT: Still i stay with my point of view.
---
Quote:
Originally Posted by Jefff
exit
Код:
SetTimerEx("DestroyVeh",5000,0,"dd",playerid,vehicleid);
Код:
forward DestroyVeh(p,v);
public DestroyVeh(p,v)
{
if(!IsPlayerInVehicle(p,v)){
DestroyVehicle(v);
}
return 1;
}
|
WTF, if he get's out of a vehicle how the hell would he be in it.
|
! means the opposite. In this case, if the player is out of a vehicle, then the vehicle gets destroyed if he leaves it
Re: Add timers if you leave vehicles, how? -
DJDhan - 03.06.2010
Quote:
Originally Posted by WackoX
Quote:
Originally Posted by Shady91
wrong, I would do something like
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid) {
SetTimerEx("delcar", 5000, 0, "i", vehicleid) return 1; }
forward delcar(vehicleid); public delcar(vehicleid) { DestroyVehicle(vehicleid); //or SetVehicleToRespawn(vehicleid); return 1; }
|
You are wrong;
* He said the car has te be destroyed, you destroy and respawn them.
* You don't have to destroy a car that would be respawned, unuseless.
* You have no idea of identation.
EDIT: Still i stay with my point of view.
|
Dude, can you see " //or " he typed between the Destroy and Set to respawn commands?
Re: Add timers if you leave vehicles, how? -
shady91 - 03.06.2010
Quote:
Originally Posted by WackoX
Quote:
Originally Posted by Shady91
wrong, I would do something like
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid) {
SetTimerEx("delcar", 5000, 0, "i", vehicleid) return 1; }
forward delcar(vehicleid); public delcar(vehicleid) { DestroyVehicle(vehicleid); //or SetVehicleToRespawn(vehicleid); return 1; }
|
You are wrong;
* He said the car has te be destroyed, you destroy and respawn them.
* You don't have to destroy a car that would be respawned, unuseless.
* You have no idea of identation.
EDIT: Still i stay with my point of view.
---
Quote:
Originally Posted by Jefff
exit
Код:
SetTimerEx("DestroyVeh",5000,0,"dd",playerid,vehicleid);
Код:
forward DestroyVeh(p,v);
public DestroyVeh(p,v)
{
if(!IsPlayerInVehicle(p,v)){
DestroyVehicle(v);
}
return 1;
}
|
WTF, if he get's out of a vehicle how the hell would he be in it.
|
Err are you blind? can you not see //or
depending on what he wants to do so you wrong for not reading what I wrote
and when you post code in [[pawn]] format it mess's up the indentation also why would I care about fixing indentation on a post on a forum?? he has a brain he could do that him self.
also you spelt indentation wrong.
Re: Add timers if you leave vehicles, how? -
MastahServers - 03.06.2010
None of the timers worked