[Ajuda] Spawn Aleatorio de Armas - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Spawn Aleatorio de Armas (
/showthread.php?tid=309712)
[Ajuda] Spawn Aleatorio de Armas -
@SwY - 08.01.2012
Estou criando um spawn aleatorio de armas. mas da o erro:
error 029: invalid expression, assumed zero
pawn Код:
new armas[18] = {4, 9, 22, 23, 24, 25, 27, 26, 28, 29, 30, 31, 32, 33, 34, 42, 41}, rand, rand2, rand3, rand4;
for(new i; i < 4; i ++)
{
if(!i)
{
rand = armas[random(sizeof armas)];
GivePlayerWeapon(playerid, rand, 15000);
}
else if(i == 1)
{
Start:
rand2 = armas[random(sizeof armas)];
if(rand2 == rand) goto Start;
GivePlayerWeapon(playerid, rand2, 15000);
}
else
{
Start2:
rand3 = armas[random(sizeof armas)];
if(rand3 == rand2 || rand3 == rand) goto Start2;
GivePlayerWeapon(playerid, rand3, 15000);
}
else // Linha do ERRO.
{
Start3:
rand4 = armas[random(sizeof armas)];
if(rand4 == rand3 || rand4 == rand2) goto Start3;
GivePlayerWeapon(playerid, rand4, 15000);
}
}
#pragma unused armas
Thx For All!
Re: [Ajuda] Spawn Aleatorio de Armas -
WeenSoares_ - 08.01.2012
Cade a linha do erro --', nгo tenho bola de cristal, e tambйm nгo vou caзar pois vocк pode me facilitar isto
Re: [Ajuda] Spawn Aleatorio de Armas -
@SwY - 08.01.2012
Estб em comentбrios. Sу prestar um pouco de atenзгo.. (: