Weapons Skills (single Player Method) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weapons Skills (single Player Method) (
/showthread.php?tid=559432)
Weapons Skills (single Player Method) -
Arxalan - 23.01.2015
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.
Re: Weapons Skills (single Player Method) -
JonathanFeitosa - 23.01.2015
OnPlayerWeaponShot
Re: Weapons Skills (single Player Method) -
Arxalan - 23.01.2015
Quote:
Originally Posted by JonathanFeitosa
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.
Re: Weapons Skills (single Player Method) -
JonathanFeitosa - 23.01.2015
pawn Код:
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
Re: Weapons Skills (single Player Method) -
Arxalan - 23.01.2015
Do you know the id of that object?