SA-MP Forums Archive
code not working (simple) - 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: code not working (simple) (/showthread.php?tid=363070)



code not working (simple) - Gooday - 26.07.2012

pawn Код:
CMD:tazer(playerid, params[])
{
   if(GetPlayerWeapon(playerid) == 24) GivePlayerWeapon(playerid, 23, 17); //Give playerid sawnoff shotgun with 500 ammo
   if(GetPlayerWeapon(playerid) == 23) GivePlayerWeapon(playerid, 24, 1000000); //Give playerid sawnoff shotgun with 500 ammo
    return 1;
}
It's not working, any fix?


Re: code not working (simple) - ViniBorn - 26.07.2012

What is the problem?


PS:

23 = Silenced 9mm
24 = Desert Eagle
26 = Sawnoff Shotgun


Re: code not working (simple) - arman'as - 26.07.2012

What is the problem?


Re: code not working (simple) - Gooday - 26.07.2012

The player doesn't get the weapons.


Re: code not working (simple) - ViniBorn - 26.07.2012

The command only works if the player is with the weapon in hand


Re: code not working (simple) - Cxnnor - 26.07.2012

pawn Код:
CMD:tazer(playerid, params[])
{
    GivePlayerWeapon(playerid, 23, 17);
    if(GetPlayerWeapon(playerid) == 23) GivePlayerWeapon(playerid, 24, 1000000);
}