[Ajuda] pegar as 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] pegar as armas (
/showthread.php?tid=491447)
pegar as armas -
RussoTDM - 30.01.2014
eu fiz uma stock pra quando ele pegar o level, ele ganhar uma arma, e assim vai indo
ai no onplayerdeath botei pra chegar isso e ver se ele deve ganhar uma arma
mais sai, ele ganha + muniзгo da mesma arma, e se eu botasse pra resetar todas antes de pegar, ele ia ficar ganhando bala toda vez q matasse, ai n ia ter motivo ter uma loja pra comprar muniзгo ta ai o cуdigo
Код:
stock todoskill(playerid)
{
if(GetPlayerTeam(playerid) == cegos)
{
if(PlayerInfo[playerid][pLevel] >= 3)
{
GivePlayerWeapon(playerid,16,10);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 6)
{
GivePlayerWeapon(playerid,18,10);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 10)
{
GivePlayerWeapon(playerid,25,120);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 20)
{
GivePlayerWeapon(playerid,25,300);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 50)
{
GivePlayerWeapon(playerid,27,400);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 60)
{
GivePlayerWeapon(playerid,28,500);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 70)
{
GivePlayerWeapon(playerid,32,500);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 80)
{
GivePlayerWeapon(playerid,29,500);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 90)
{
GivePlayerWeapon(playerid,30,600);
return 1;
}
else if(PlayerInfo[playerid][pLevel] >= 100)
{
GivePlayerWeapon(playerid,31,800);
return 1;
}
}
return 1;
}
Re: pegar as armas -
ViniBorn - 30.01.2014
Texto confuso, mas se entendi direito, tenta
GivePlayerWeapon
Re: pegar as armas -
Schocc - 30.01.2014
Entrada de dados: OnPlayerDeath
Saнda de dados: OnPlayerSpawn, ou OnPlayerKeyStateChange seria uma boa opзгo.