SA-MP Forums Archive
[Ajuda] rdon - 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] rdon (/showthread.php?tid=547240)



rdon - JoshNudock - 21.11.2014

Pessoal, podem em ajudar urgente? estou com um random aqui, mais nгo sei como fazer, ou seja nгo tenho muita exp, alguйm pode me ensinar? tipo, esta dando essas seguintes Warning's..

Код:
C:\Documents and Settings\P.Henrique\Desktop\Brasil Advanced Life - BAL\gamemodes\WSA.pwn(668) : warning 213: tag mismatch
C:\Documents and Settings\P.Henrique\Desktop\Brasil Advanced Life - BAL\gamemodes\WSA.pwn(668) : warning 213: tag mismatch
C:\Documents and Settings\P.Henrique\Desktop\Brasil Advanced Life - BAL\gamemodes\WSA.pwn(51901) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\Brasil Advanced Life - BAL\gamemodes\WSA.pwn(51901) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\Brasil Advanced Life - BAL\gamemodes\WSA.pwn(51901) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
pawn Код:
new Float:RandomPosVeh[][] =
{
{2119.5361,2155.3110,10.4511,180.3939, 1, 1} // warning 213 -  "1, 1" > a cor do veiculo
/*{2119.5361,2155.3110,10.4511,180.3939, 1, 1},
{2119.5361,2155.3110,10.4511,180.3939, 1, 1} */

};

cCarro[idx] = AddStaticVehicle(ModeloVeiculo[playerid], RandomPosVeh[rdon][0], RandomPosVeh[rdon][1], RandomPosVeh[rdon][2]); // warning 202
Isso ae й pra sentar o veiculo aleatoriamente em uma posiзгo depois de a pessoa te comprado um veiculo, mais nгo sei como fazer..


Re: rdon - MultiKill - 21.11.2014

pawn Код:
new Float:RandomPosVeh[][4] =
{
{2119.5361,2155.3110,10.4511,180.3939} // warning 213 -  "1, 1" > a cor do veiculo
/*{2119.5361,2155.3110,10.4511,180.3939},
{2119.5361,2155.3110,10.4511,180.3939} */

};
Estб dando o aviso 213, por a variбvel RandomPosVeh sу armazena Float e vocк estб tentando armazenar um nъmero inteiro.

Entгo para fazer cores aleatуrias vocк pode usar -1, mas a cor sempre vai mudar quando o veнculo der respawn.

O outro aviso se da pela funзгo estar faltando argumentos.

Para ver os parвmetros da funзгo.


Re: rdon - JoshNudock - 21.11.2014

Eu fiz isso aqui de coordenadas..

pawn Код:
new Float:RandomPosVeh[][4] = // tenho que mudar esse 4? pois criei mais posiзхes..
{
{2155.3164,2167.9827,10.4357,0.6682},
{2155.4575,2182.4282,10.4439,358.7434},
{2119.5645,2150.1973,10.4193,181.1827},
{2119.5642,2139.2737,10.4275,178.8669},
{2119.5051,2161.8894,10.4173,180.0685},
{2119.4692,2128.6182,10.4386,181.6405},
{2076.7849,2170.4246,10.5915,90.6750},
{2155.2305,2117.8062,10.4462,0.0674}
};
E a cor Multi Kill? onde posso colocar ela, pois sу quero colocar uma a cor id 8(branco), como posso fazer?

ajudou? +rep


Re: rdon - MultiKill - 21.11.2014

Primeira coisa vocк nгo estб colocando o angulo do veнculo.
pawn Код:
RandomPosVeh[rdon][3]; // 3 = angulo do veнculo.
Se sу vai colocar uma cor nгo precisa usar random.
pawn Код:
cCarro[idx] = AddStaticVehicle(..., RandomPosVeh[rdon][3], 1, 1);



Re: rdon - JoshNudock - 21.11.2014

Resolvido!

48 antes de rep, agora estб com mais rep!

vlw!


Re: rdon - MultiKill - 21.11.2014

Se eu nгo me engano a cor branda й a id 1.
pawn Код:
cCarro[idx] = AddStaticVehicle(ModeloVeiculo[playerid], RandomPosVeh[rdon][0], RandomPosVeh[rdon][1], RandomPosVeh[rdon][2], RandomPosVeh[rdon][3], 8, 8);



Re: rdon - JoshNudock - 21.11.2014

Voltando ao assunto..

estб certo?

pawn Код:
cCarro[idx] = AddStaticVehicle(ModeloVeiculo[playerid], RandomPosVeh[rdon][0], RandomPosVeh[rdon][1], RandomPosVeh[rdon][2], RandomPosVeh[rdon][3], 8, 8);

@EDIT

pawn Код:
new Float:RandomPosVeh[][4] =// estб correto isso?
{
{2155.3164,2167.9827,10.4357,0.6682},
{2155.4575,2182.4282,10.4439,358.7434},
{2119.5645,2150.1973,10.4193,181.1827},
{2119.5642,2139.2737,10.4275,178.8669},
{2119.5051,2161.8894,10.4173,180.0685},
{2119.4692,2128.6182,10.4386,181.6405},
{2076.7849,2170.4246,10.5915,90.6750},
{2155.2305,2117.8062,10.4462,0.0674}
};
Gosto de certeza das coisas, : )


Re: rdon - MultiKill - 21.11.2014

Estб certo.