SA-MP Forums Archive
Weapon Bug - 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: Weapon Bug (/showthread.php?tid=364716)



Weapon Bug - kbalor - 31.07.2012

What is the maximum weapon ammo? Coz I can't use E to change weapon it's stuck(weapon switch to fast) But Q work nice.


Re: Weapon Bug - DarkB0y - 31.07.2012

i think it's don't have a maximum ammo for weapons


Re: Weapon Bug - kbalor - 31.07.2012

Quote:
Originally Posted by X_Boy
Посмотреть сообщение
i think it's don't have a maximum ammo for weapons
OMG! I capture the Bug this is captured in 1000 milliseconds

How do I prevent this bug??


Respuesta: Weapon Bug - HarlemSAMP - 31.07.2012

Max weapon ammo is around 600k if i'm correct, that will the ammo value invisible in your weapon HUD


Re: Respuesta: Weapon Bug - kbalor - 31.07.2012

Quote:
Originally Posted by HarlemSAMP
Посмотреть сообщение
Max weapon ammo is around 600k if i'm correct, that will the ammo value invisible in your weapon HUD
pawn Код:
CMD:cs(playerid, params[])
{
 new string[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(string, sizeof(string), "{6666FF}(/cs) {00CCFF}%s {6666FF}has Teleported to Counter-Strike Deathmatch",pName);
    SendClientMessageToAll(0x6666FFFF, string);
    GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Counter-Strike",2000,3);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 10000); //This give's me bug??
    GivePlayerWeapon(playerid, 24, 10000);  //This give's me bug??
    GivePlayerWeapon(playerid, 28, 10000);  //This give's me bug??
    GivePlayerWeapon(playerid, 30, 10000);  //This give's me bug??
When I use my weapon menu filterscript my ammo get's invisible.
But When I tried to teleport on this map /cs it gives me weapon but ammo shows.


Respuesta: Re: Respuesta: Weapon Bug - HarlemSAMP - 31.07.2012

Quote:
Originally Posted by kbalor
Посмотреть сообщение
pawn Код:
CMD:cs(playerid, params[])
{
 new string[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(string, sizeof(string), "{6666FF}(/cs) {00CCFF}%s {6666FF}has Teleported to Counter-Strike Deathmatch",pName);
    SendClientMessageToAll(0x6666FFFF, string);
    GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Counter-Strike",2000,3);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 10000); //This give's me bug??
    GivePlayerWeapon(playerid, 24, 10000);  //This give's me bug??
    GivePlayerWeapon(playerid, 28, 10000);  //This give's me bug??
    GivePlayerWeapon(playerid, 30, 10000);  //This give's me bug??
When I use my weapon menu filterscript my ammo get's invisible.
But When I tried to teleport on this map /cs it gives me weapon but ammo shows.
Try this:

pawn Код:
CMD:cs(playerid, params[])
{
 new string[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(string, sizeof(string), "{6666FF}(/cs) {00CCFF}%s {6666FF}has Teleported to Counter-Strike Deathmatch",pName);
    SendClientMessageToAll(0x6666FFFF, string);
    GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Counter-Strike",2000,3);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 600000);
    GivePlayerWeapon(playerid, 24, 600000);
    GivePlayerWeapon(playerid, 28, 600000);
    GivePlayerWeapon(playerid, 30, 600000);
That should fix it, as when you use /cs it gives you infinite ammo now, try it


EDIT: if you want to have infinite ammo in your whole GM, change "GivePlayerWeapon(playerid, x, ammount of bullets 60k); in every cmd that gives you a gun.