09.01.2012, 19:09
Hey, i have a question. Is there a way, to make the ammount of hydra rockets, like you fire 6 rockets, and you cannot fire anymore ? If yes, how to ? Thanks.
new rockets[MAX_PLAYERS];
rockets[playerid] ++;
if(rockets[playerid] == 6) {
// Code
}
new newcar = GetPlayerVehicleID(playerid);
if( PRESSED(KEY_SECONDARY_ATTACK) )
{
if(HydrosID(newcar))
{
rockets[playerid] ++;
if(rockets[playerid] == 6)
{
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "No more rockets!");
return 0;
}
}
}
forward HydrosID(carid);
public HydrosID(carid)
{
new model = GetVehicleModel(carid);
if(model == 520)
{
return 1;
}
return 0;
}