Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
How to detect like if someone shot,even if he didnt hit or shoot a player but if he used the gun to shoot
note:i dont have bullet system,i mean he always has 9999 bullets,so i cant detect it by the gun bullets..
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
well i am trying to make like if he shoot with a gun,i can use yours emma.. and thanks for it but how to make it like:
lets says i detected that he shot,how to make like if he shot and he is detected he cant change to another weapon
i have made everything but i need to make it that he cant change weapons,i have set a timer and everything but how to let it like remove his weapons or toggles his ability to change weapon or give him his weapons back after the timer is over...
Posts: 2,041
Threads: 97
Joined: Jun 2013
I understood that you want that the player has always 'X' it arms and that could not change it.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) != WeaponID) //It checks if the player does not have this weapon.
{
SetPlayerArmedWeapon(playerid, WeaponID); //It gives him the weapon.
}
return 1;
}
It changes the 'weaponid' to the weapon that you wish not to change.
Im sorry if I was wrong on the doubt.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
but how to get the player's gun which he used... so i can use WeaponID for it?
Posts: 2,041
Threads: 97
Joined: Jun 2013
Quote:
Originally Posted by iBots
but how to get the player's gun which he used... so i can use WeaponID for it?
|
To what do you refer? 'WeaponID' you must change it for her ID of the weapon that you wish to have all the time.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
Yea but i dont want to set the weapon i want it to be automatic like if i shot with shotgun i cant change from shotgun and same for all of the weapons