Posts: 207
Threads: 60
Joined: Nov 2011
Reputation:
0
Well - I Was wondering - How to add more ammo ? Because I Was making a Clips system - So that.. Once you use a Clip - A Certain amount of Ammo get increased to the weapon , Like - if you have 10 bullets and you used a clip - you 'll get 20 bullet.. so - how to do it ? Xd
Posts: 16
Threads: 2
Joined: Aug 2012
Posts: 20
Threads: 6
Joined: Feb 2012
Reputation:
0
Well if you want to add to AK, then put this code to somewhere:
SetPlayerAmmo(playerid,30,500);
It will set 500 ammo.
Posts: 207
Threads: 60
Joined: Nov 2011
Reputation:
0
Mhm - You don't get me -How to UPDATE the ammo ? Like - to increase it..
Posts: 16
Threads: 2
Joined: Aug 2012
I guess it's a Mafia Wars server, so add it OnPlayerSpawn
For example
pawn Код:
public OnPlayerSpawn
{
if(gTeam[playerid] == TEAM_POLICE)
{
GivePlayerWeapon(playerid,30)
SetPlayerAmmo(playerid,30,500);
}
return 1;
}
Posts: 582
Threads: 18
Joined: Jul 2010
Reputation:
0
It could get a little buggy when players would lag. Just use OnPlayerKeyStateChange function. That's all you need.
Posts: 207
Threads: 60
Joined: Nov 2011
Reputation:
0
Guys.. It's not that hard to understand lol
- Let's say - now you have a gun and you are fighting with ? K ? and you have a CLIP to INCREASE "INCREASE" your Ammo - So once you use the - the BULLETS [Ammo] IN the WEAPON SHOULD INCREASE - so if you have 10 - it will be 20 - BUT if you have 20 - It will be 30 , Do you get it now ? lol