28.10.2016, 10:47
Sup!
i try make today a /giveammo command its work fine bat sometimes its delete me all ammo and then add +30 like i have weapon with 300 bullets, right? then i type /giveammo playerid, and its delete me all 300 bullets and add +30 so i just have 30 bullets bat i should have 330 so this is me code
Its not full code bat its the most important part of code.
i try make today a /giveammo command its work fine bat sometimes its delete me all ammo and then add +30 like i have weapon with 300 bullets, right? then i type /giveammo playerid, and its delete me all 300 bullets and add +30 so i just have 30 bullets bat i should have 330 so this is me code
Код:
new Ammo = GetPlayerAmmo(playerid); pInfo[playerid][Giveammo] -= 1; GetPlayerName(playerid, name, sizeof(name)); SetPlayerAmmo(playerid, 16, Ammo+1); SetPlayerAmmo(playerid, 18, Ammo+1); SetPlayerAmmo(playerid, 22, Ammo+30); SetPlayerAmmo(playerid, 23, Ammo+30); SetPlayerAmmo(playerid, 24, Ammo+20); SetPlayerAmmo(playerid, 25, Ammo+30); SetPlayerAmmo(playerid, 26, Ammo+20); SetPlayerAmmo(playerid, 27, Ammo+20); SetPlayerAmmo(playerid, 28, Ammo+30); SetPlayerAmmo(playerid, 29, Ammo+30); SetPlayerAmmo(playerid, 30, Ammo+30); SetPlayerAmmo(playerid, 31, Ammo+30); SetPlayerAmmo(playerid, 32, Ammo+30); SetPlayerAmmo(playerid, 33, Ammo+20); SetPlayerAmmo(playerid, 34, Ammo+20); SetPlayerAmmo(playerid, 37, Ammo+15); SetPlayerAmmo(playerid, 39, Ammo+1); SetPlayerAmmo(playerid, 41, Ammo+20); SetPlayerAmmo(playerid, 42, Ammo+20); format(string,sizeof(string),""chat""COL_LGREEN" You just give ammo for %s",name); SendClientMessage(playerid, 0x0000FFFF, string); format(stringa,sizeof(stringa),""chat""COL_LGREEN" %s has given you ammo",name); SendClientMessage(playerid, 0x0000FFFF, stringa); GivePlayerXP(playerid,2);