17.05.2017, 06:58
Update v1.1.0:
- Added callback:
- Added function:
- Example code:
- Added callback:
PHP Code:
//called on vehicle damage updated by stinger
OnVehicleDamageByStinger(playerid,killerid,mobid,old_tires,new_tires);
PHP Code:
GetPlayerActiveDynamicStinger(playerid);
ToggleDynamicStingerDamage(mobid,bool:toggle);
- Example code:
PHP Code:
public OnVehicleDamageByStinger(playerid,killerid,mobid,old_tires,new_tires){
if(killerid != INVALID_PLAYER_ID && new_tires == 15){
new p_name[MAX_PLAYER_NAME],string[144];
GetPlayerName(killerid,p_name,sizeof(p_name));
format(string,sizeof(string),"{00AAFF}Your vehicle has been damaged by {00FF00}%s {00AAFF}stinger.",p_name);
SendClientMessage(playerid,-1,string);
}
return 1;
}