Hello Need small help plz -
MBilal - 19.09.2015
Код:
for (new i = 0; i <= 12; i++)
{
GetPlayerWeaponData(playerid, i, weapons[playerid][i], PlayerWeaponAmmo[playerid][i]);
if(weapons[playerid][i] == WEAPON_GOLFCLUB)
{
Kick(playerid);
}
}
Why its not working?
I use this because GetPlayerWeapon(playerid) only work for the weapon in hand at moment.
How to check player have WEAPON_GOLFCLUB?
Kindly Help
Thanks.
Re: Hello Need small help plz -
Mister0 - 19.09.2015
Try this chabge the number off the golf club weapon id
PHP код:
new gun[2];
GetPlayerWeaponData(playerid, 5, gun[0], gun[1]);
if(gun[0] == 30)
SendClientMessage(playerid,-1,"You Have AK-47");
Re: Hello Need small help plz -
MBilal - 19.09.2015
i try that already that also not working..
Re: Hello Need small help plz -
Mister0 - 19.09.2015
Copy exactly that code and give you an ak47 and you will se it's work perfect
Re: Hello Need small help plz -
MBilal - 19.09.2015
Nope not work.
Re: Hello Need small help plz -
HoboGamings - 19.09.2015
Pretty sure it's this bit in your code
Add this to your code
Код:
new kick_gTimer[MAX_PLAYERS];
stock Kick(playerid) {
KillTimer(kick_gTimer[playerid]);
kick_gTimer[playerid] = SetTimerEx("DelayedKick", 500, false, "i", playerid);
return 1;
}
and try now
Re: Hello Need small help plz -
MBilal - 19.09.2015
lol I want to getplayerweapon which he have in slots rather than delaying kick.
Re: Hello Need small help plz -
sanamalik400 - 20.09.2015
Bilal have fb ..pm me
Re: Hello Need small help plz -
sanamalik400 - 20.09.2015
Fb ki id hy to pm kr do
Re: Hello Need small help plz -
xVIP3Rx - 20.09.2015
Every type of weapon has a slot, so whenever you take it it'll get in that slot or replace the one on it, you don't need to check all the slots, just the one holding the weapon.
As for "WEAPON_GOLFCLUB", the slot is 1, So you'll just have to:
pawn Код:
GetPlayerWeaponData(playerid, 1, weapons[playerid], PlayerWeaponAmmo[playerid]);
if(weapons[playerid] == WEAPON_GOLFCLUB) Kick(playerid);