PDA

View Full Version : Weapons Skills (single Player Method)


Arxalan
23/01/2015, 10:35 AM
Hello , i want to know how to add a system like the Single player in which cj increases its weapon skill by Shooting the target in Ammunation .

EDIT: I Want this system.
http://i.ytimg.com/vi/P_6BHDDPqBE/maxresdefault.jpg

JonathanFeitosa
23/01/2015, 11:29 AM
OnPlayerWeaponShot

Arxalan
23/01/2015, 11:37 AM
OnPlayerWeaponShot

"This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots)."
This is Player Shooting Callback . I want to have a system in which the target get down from the upper and players need to shoot them . Maybe you need to check the Gta San andreas(single Player) ammu nation.

JonathanFeitosa
23/01/2015, 11:45 AM
public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
if(hittype == BULLET_HIT_TYPE_OBJECT)
{
if( IsValidObject( hitid ) ) // // hitid = object id
{
SendClientMessage( playerid, -1, "Nice! " );
DestroyObject( hitid ); // Destroy object
}
}
return 1;
}


+ MoveObject

Arxalan
23/01/2015, 02:20 PM
Do you know the id of that object?