PDA

View Full Version : Weapons Detect


Stereotype
13/06/2013, 02:11 PM
How i detect if player is holding weapons in hand?

IstuntmanI
13/06/2013, 02:12 PM
GetPlayerWeapon
GetPlayerWeaponData

Stereotype
13/06/2013, 02:16 PM
Yes :D , and how i can just to put some weapon in player hand if you get me xD
Ex: IfPlayerToPoint(playerid, bla bla bla) how i can set that player cannot hold weapon , not to reset , just to player cannot hold weapon ?: )

Guest123
13/06/2013, 02:28 PM
here example


public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, Float:Size,Float:X,Float:Y,Float:Z))
{
if(GetPlayerWeapon(playerid))
{
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid, "You Cannot Have A Weapon On This Cordinates !", 3000, 1);
return 1;
}
}
return 1;
}

Stereotype
13/06/2013, 02:32 PM
Yes , but ResetPlayerWeapons will remove player weapons ? .. I don't wanna remove it , just if player scrools on weapon , server will auto move to first (n/a) id 0 :)..

IstuntmanI
13/06/2013, 02:33 PM
SetPlayerArmedWeapon, use it on OnPlayerUpdate and check if he is in that area, and if he is, just SetPlayerArmedWeapon to 0.

Stereotype
13/06/2013, 02:34 PM
Yes , i just was too retarded to find a function -.- .. Thank's guys .. REP +