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



Duvida - henriqueTL - 29.03.2017

Bom Tarde galera bom eu queria saber como vejo os danos das armas no game mode Tiro se a minigun tira 100% de dano a onde vejo a quantidade de dano para diminuir os danos da arma.


Re: Duvida - HoodScript - 29.03.2017

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

e utilize getplayerweapon para o issuerid e setplayerhealth(playerid, GetPlayerHealth(playerid, health)-dano);

*dano = vocк altera para o dano desejado!

exemplo:


Код:
if(GetPlayerWeapon(issuerid) == 38)//MINIGUN
{
      new Float:health;
      SetPlayerHealth(playerid, GetPlayerHealth(playerid, health)-dano);
      return 1;
}



Re: Duvida - Rato22 - 30.03.2017

PHP код:
dcmd_vervida(playeridparams[])
{
new 
tmp[256], idxstring[128];
tmp strtok(paramsidx);
new 
id;
if(!
IsNumeric(tmp))
id ReturnPlayerID(tmp);
else
id strval(tmp);
if(
Player[playerid][pAdmin] < 1)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Vocк nгo tem permissгo para usar este comando!");
if(!
strlen(tmp))
return 
SendClientMessage(playeridCOR_USOCORRETO"Uso: /vervida [id]");
new 
Float:health;
GetPlayerHealth(id,health);
format(stringsizeof(string), "Vida do Player %s: %.1f"idhealth);
SendClientMessage(playerid0xE3E3E3FF,string);
return 
1;




Re: Duvida - HoodScript - 30.03.2017

Quote:
Originally Posted by Rato22
Посмотреть сообщение
PHP код:
dcmd_vervida(playeridparams[])
{
new 
tmp[256], idxstring[128];
tmp strtok(paramsidx);
new 
id;
if(!
IsNumeric(tmp))
id ReturnPlayerID(tmp);
else
id strval(tmp);
if(
Player[playerid][pAdmin] < 1)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Vocк nгo tem permissгo para usar este comando!");
if(!
strlen(tmp))
return 
SendClientMessage(playeridCOR_USOCORRETO"Uso: /vervida [id]");
new 
Float:health;
GetPlayerHealth(id,health);
format(stringsizeof(string), "Vida do Player %s: %.1f"idhealth);
SendClientMessage(playerid0xE3E3E3FF,string);
return 
1;

ele pediu pra como altera o valor do dano sa arma...


Re: Duvida - henriqueTL - 30.03.2017

+rep pros 2


Re: Duvida - Rato22 - 30.03.2017

Quote:
Originally Posted by HoodScript
Посмотреть сообщение
ele pediu pra como altera o valor do dano sa arma...
Esse comando era pro outro post kk.


Re: Duvida - henriqueTL - 30.03.2017

Quote:
Originally Posted by Rato22
Посмотреть сообщение
PHP код:
dcmd_vervida(playeridparams[])
{
new 
tmp[256], idxstring[128];
tmp strtok(paramsidx);
new 
id;
if(!
IsNumeric(tmp))
id ReturnPlayerID(tmp);
else
id strval(tmp);
if(
Player[playerid][pAdmin] < 1)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Vocк nгo tem permissгo para usar este comando!");
if(!
strlen(tmp))
return 
SendClientMessage(playeridCOR_USOCORRETO"Uso: /vervida [id]");
new 
Float:health;
GetPlayerHealth(id,health);
format(stringsizeof(string), "Vida do Player %s: %.1f"idhealth);
SendClientMessage(playerid0xE3E3E3FF,string);
return 
1;

Quote:
Originally Posted by HoodScript
Посмотреть сообщение
ele pediu pra como altera o valor do dano sa arma...
Quote:
Originally Posted by Rato22
Посмотреть сообщение
Esse comando era pro outro post kk.
kkk quero ver o sistema q vc falou q ia posta la na sua pag '-'