SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/05/2020, 11:33 PM   #1
Muxi
Little Clucker
 
Join Date: Oct 2016
Posts: 12
Reputation: 0
Default [Help] Vehicle armor issue

The "OnVehicleSpawn" function has no effect, I need your help please


public OnVehicleSpawn(vehicleid)
{
new modelo = GetVehicleModel(vehicleid);
if(modelo == 407 || modelo == 416 || modelo == 427 || modelo == 433 || modelo == 490 || modelo == 528 || modelo == 544 || modelo == 596 || modelo == 597 || modelo == 598 || modelo == 601 || modelo == 425 || modelo == 428 || modelo == 432 || modelo == 433)
//El id del auto 411 es el modelo Infernus, 522 es NRG-500 moto y 432 rhino
{
SetVehicleHealth(vehicleid, 99999.9);// La cantidad de vida del auto 1000 y 500 sale humo
}

return 1;
}
Muxi is offline   Reply With Quote
Old 23/05/2020, 12:32 AM   #2
xRadical3
Huge Clucker
 
xRadical3's Avatar
 
Join Date: May 2017
Location: Iran
Posts: 450
Reputation: 14
Default Re: Vehicle armor issue

Show us the error line and error of the compiler.
xRadical3 is offline   Reply With Quote
Old 23/05/2020, 02:15 AM   #3
Muxi
Little Clucker
 
Join Date: Oct 2016
Posts: 12
Reputation: 0
Default Re: Vehicle armor issue

It is not an error, the problem is when I enter the server the function does not run, I do not know if it is due to an outdated include
Muxi is offline   Reply With Quote
Old 23/05/2020, 10:55 AM   #4
xRadical3
Huge Clucker
 
xRadical3's Avatar
 
Join Date: May 2017
Location: Iran
Posts: 450
Reputation: 14
Default Re: Vehicle armor issue

This callback is called when a vehicle respawns from `SetVehicleToRespawn`.
Put code inside `OnPlayerEnterVehicle`.
xRadical3 is offline   Reply With Quote
Reply

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
Vehicle Armor TheDarkMore Scripting Help 1 17/01/2019 01:36 PM
vehicle issue jeffery30162 Scripting Help 1 15/06/2014 11:17 PM
Unoccupied vehicle sync, boat surfing pausing issue, parachute with vehicle issue, surfing w/ skydiving issue Kar Bug Reports 2 10/06/2013 09:24 AM
AVS Vehicle issue. OpticKiller Scripting Help 8 16/05/2013 02:20 AM


All times are GMT. The time now is 01:23 AM.


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