SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 05/02/2011, 06:58 PM   #1
MrIncredible
Big Clucker
 
Join Date: Feb 2010
Posts: 132
Reputation: 0
Default OnVehicleDeath Problem..

ok.. so, i give a player a vehicle, and i code itl ike this

Code:
onplayerspawn 

car[playerid] =  CreateVehicle(444, -25.4514,462.4341,31.8625,19.7708, 6, 54, -1);
PutPlayerInVehicle(playerid,car[playerid],0);
this works fine, but now i want to know when the vehicle dies.. so i do this

Code:
 onvehicledeath
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (car[i] == vehicleid)
{ 
SendClientMessageToAll(TRES,"A vehicle has died");
car[i]=-1;
}
}
but it seems to work only when your vehicle goins in the water, not when it actualy blows up.. you know its health goes lover than 250, and it blows up.. so what is the problem?
MrIncredible is offline  
Old 05/02/2011, 07:21 PM   #2
MrIncredible
Big Clucker
 
Join Date: Feb 2010
Posts: 132
Reputation: 0
Default Re: OnVehicleDeath Problem..

anyone want to help?
MrIncredible is offline  
Old 05/02/2011, 10:13 PM   #3
MrIncredible
Big Clucker
 
Join Date: Feb 2010
Posts: 132
Reputation: 0
Default Re: OnVehicleDeath Problem..

hellllllllllllllp
MrIncredible is offline  
Old 05/02/2011, 10:15 PM   #4
marinov
Gangsta
 
marinov's Avatar
 
Join Date: Oct 2010
Location: San Andreas
Posts: 591
Reputation: 8
Default Re: OnVehicleDeath Problem..

stop bumping, read the rules, only bump post 48hrs old
__________________
http://mczombiecom.co.nr/
marinov is offline  
Old 07/02/2011, 12:14 AM   #5
MrIncredible
Big Clucker
 
Join Date: Feb 2010
Posts: 132
Reputation: 0
Default Re: OnVehicleDeath Problem..

Help, anyone?
MrIncredible is offline  
Old 08/02/2011, 10:02 PM   #6
MrIncredible
Big Clucker
 
Join Date: Feb 2010
Posts: 132
Reputation: 0
Default Re: OnVehicleDeath Problem..

helpp, pls help mee.
MrIncredible is offline  
Old 08/02/2011, 10:35 PM   #7
Unknown123
Guest
 
Posts: n/a
Default Re: OnVehicleDeath Problem..

Quote:
Originally Posted by marinov View Post
stop bumping, read the rules, only bump post 48hrs old
Read what he said.


Anyway:
Change
pawn Code:
for (new i = 0; i != MAX_PLAYERS; i++)
TO
pawn Code:
for (new i = 0; i != MAX_VEHICLES; i++)
 
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnVehicleDeath lost13 Русский/Russian 9 17/12/2010 12:44 PM
OnVehicleDeath Jakku Help Archive 2 02/03/2010 07:38 AM
Help with OnVehicleDeath Toney Help Archive 0 22/11/2009 12:02 PM
OnVehicleDeath Problem Jakku Help Archive 10 08/11/2009 08:16 AM
OnVehicleDeath Jakku Help Archive 0 20/10/2009 06:02 PM


All times are GMT. The time now is 09:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.