29.09.2012, 17:29
Dar Armas Para todos os players on como fazer isso?
tem q criar algum loop algo asim?
tem q criar algum loop algo asim?
for (new r = 0; r != MAX_PLAYERS; r++)
{
if(IsPlayerConnected(r))
{
GivePlayerWeapon(r, ID, Balas);
}
}
for(new i=0;i !=MAX_PLAYERS;i++)
{
SetPlayerArmour(i, 90);
SetPlayerHealth(i, 100);
GivePlayerWeapon(i, 24, 500);
GivePlayerWeapon(i, 29, 1000);
GivePlayerWeapon(i, 25, 1000);
GivePlayerWeapon(i, 31, 1000);
}
COMMAND:darferramenta(playerid, params[])
{
new Idarma,municao;
if(sscanf(params,"di",Idarma,municao)) return SendClientMessage(playerid,-1,"USE: /dararma [id da arma] [muniзгo]");
for (new r = 0; r != MAX_PLAYERS; r++)
{
if(IsPlayerConnected(r))
{
GivePlayerWeapon(r, Idarma, municao);
}
}
return 1;
}