25.09.2013, 15:00
is it possible to make a /reload command to reload your weapons?
if(GetPlayerWeapon(playerid) == 38)
{
GivePlayerWeapon(playerid, 38, 0);
GivePlayerWeapon(playerid, 38, 100); /* this will inevitably reset the weapon ID 38 and give him
100 ammo so the command can't be abused and he can keep getting ammo */
}
if(GetPlayerWeapon(playerid) == 20) // and then continue to do this...
{
GivePlayerWeapon(playerid, 20, 0);
GivePlayerWeapon(playerid, 20, 100);
}
if(GetPlayerWeapon(playerid) == 22) { GivePlayerWeapon(playerid, 22, 0); GivePlayerWeapon(playerid, PlayerInfo[playerid][pWep2a]); //ammo }
GivePlayerWeapon(playerid, weaponid, PlayerInfo[playerid][pWep2a]);
GivePlayerWeapon(playerid, PlayerInfo[playerid][pWep2a]);
Thanks guys �� you gave me the idea of using timers and stuff.. (Like when u press 'r' you will get 0 ammo and it will send you a client message 'reloading'.. (Or a gametext) and you will have to wait 3 sec and then you will get your ammo back
|