12.08.2011, 09:48
(
Последний раз редактировалось wups; 20.08.2011 в 21:20.
)
OnPlayerVehicleDamage v1
So, I think there is no normal system like this on the forums.
ChangeLog:
Quote:
Version 1: -Initial release. |
Usage:
Firstly, copy both include files into /pawno/includesInsert this code on top of your game mode after #include <a_samp>
pawn Код:
#include <OPVD>
pawn Код:
public OnPlayerVehicleDamage(playerid,vehicleid,Float:Damage)
{
return 1;
}
pawn Код:
#include <OPVD_SEC> // after include <a_samp>
An example:
pawn Код:
public OnPlayerVehicleDamage(playerid,vehicleid,Float:Damage)
{
new msg[128];
format(msg,sizeof(msg)," * You damaged vehicleid %i with %.2f",vehicleid,Damage);
SendClientMessage(playerid,COLOR,msg);
return 1;
}
pawn Код:
public OnPlayerVehicleDamage(playerid,vehicleid,Float:Damage)
{
if(Damage > 149.0)
{
new VehVars[7];
GetVehicleParamsEx(vehicleid,VehVars[0],VehVars[1],VehVars[2],VehVars[3],VehVars[4],VehVars[5],VehVars[6]);
if(VehVars[0])
{
SetVehicleParamsEx(vehicleid,false,VehVars[1],VehVars[2],VehVars[3],VehVars[4],VehVars[5],VehVars[6]);
SendClientMessage(playerid,0xFF0000AA," * Your Engine Went down!");
}
}
}
Installing:
Download and save to pawn/includes folder!Credits:
Lorenc_ inspired me Download:
Here you go:Version 1.0
Feel free to do anything you want with it.
v1 Has been tested.