GetPlayerWeaponData help.
#9

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Try
Код:
new Bazooka[MAX_PLAYERS]; // global
new weapons[MAX_PLAYERS][13][2]; // global

CMD:bazooka(playerid, params[])
{
    if (Bazooka[playerid] == 1)
    {
       GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~r~ ЎBAZOOKA EN USO!",10000,3);
       for (new i = 0; i <= 12; i++)
       {
           GetPlayerWeaponData(playerid, i, weapons[playerid][i][0], weapons[playerid][i][1]);
       }
       ResetPlayerWeapons(playerid);
       GivePlayerWeapon(playerid,35,5);
       SetTimerEx("TiempoBazooka", 20000, false, "i", playerid);
       for(new i = 0; i < MAX_PLAYERS; i++)
       PlayerPlaySound(i, 6400, 0.0, 0.0, 0.0);
    }
    else
   {
		PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
		SendClientMessage(playerid, rojo, "[ERROR]{FFFFFF} No tienes ninguna minigun para usar.");
   }
   return 1;
}

forward TiempoBazooka(playerid);
public TiempoBazooka(playerid)
{
    ResetPlayerWeapons(playerid);
	
	for(new i = 0; i < sizeof weapons; i ++)
		GivePlayerWeapon(playerid, weapons[playerid][i][0], weapons[playerid][i][1]);
	
    Bazooka[playerid] = 0;
}
Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Espaсol and better! haha
I am Brazilian and I can understand better.
Mira cuando el jugador ejecuta el comando /bazooka obtiene el bazooka con 5 misiles, pero cuando dispare todos los misiles antes de terminar el timer TiempoBazooka que le den las armas que tenнa antes.
BAZOOKA AMMO == 0 GivePlayerWeapon(playerid, weapons[playerid][i][0], weapons[playerid][i][1]);
Reply


Messages In This Thread
GetPlayerWeaponData help. - by karoliko - 18.05.2016, 13:06
Re: GetPlayerWeaponData help. - by F1N4L - 18.05.2016, 13:11
Re: GetPlayerWeaponData help. - by karoliko - 18.05.2016, 13:19
Re: GetPlayerWeaponData help. - by F1N4L - 18.05.2016, 13:21
Re: GetPlayerWeaponData help. - by karoliko - 18.05.2016, 13:30
Re: GetPlayerWeaponData help. - by F1N4L - 18.05.2016, 13:40
Re: GetPlayerWeaponData help. - by karoliko - 18.05.2016, 13:42
Re: GetPlayerWeaponData help. - by F1N4L - 18.05.2016, 13:45
Re: GetPlayerWeaponData help. - by karoliko - 18.05.2016, 13:48
Re: GetPlayerWeaponData help. - by F1N4L - 18.05.2016, 13:57

Forum Jump:


Users browsing this thread: 1 Guest(s)