SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 27/05/2020, 01:44 AM   #11
IpsUnity
Little Clucker
 
Join Date: Mar 2020
Posts: 1
Reputation: 0
Default Re: Sistema tipo do pub para samp

Variaveis Topo da GM

//---------------sistema de feridos By TIAGO_CARMO
new PlayerBar:MedicBar[MAX_PLAYERS], TimerBarMedic[MAX_PLAYERS][5],BarValue[MAX_PLAYERS] = 0, HelpMedic[MAX_PLAYERS] = -1;
new MapIconMedic[MAX_PLAYERS];
new Float:Health,
Curativos[MAX_PLAYERS],
bool:PlayerFerido[MAX_PLAYERS],
bool:Hemorragia[MAX_PLAYERS],
TimerHemo[MAX_PLAYERS];

================================================== ================================================== ===========

//public OnPlayerConnect<<<<<<<<<<<<<<<<

HelpMedic[playerid] = -1;
MedicBar[playerid] = CreatePlayerProgressBar(playerid, 291.00, 264.00, 55.50, 3.20, -16776961, 100.0);
HidePlayerProgressBar(playerid, MedicBar[playerid]);//sistema de feridos
SetPlayerProgressBarMaxValue(playerid, MedicBar[playerid], 40000);
KillTimer(TimerBarMedic[playerid][0]);
KillTimer(TimerBarMedic[playerid][1]);
BarValue[playerid] = 0;

================================================== ================================================== =============

public OnGameModeInit()<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <
{SetTimer("CheckLife", 100, true); //sistema de feridos

================================================== ================================================== ===============

//sistema de feridas
forward TempoSalvar(playerid);
public TempoSalvar(playerid)
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "* Você morreu de hemorragia.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
RemovePlayerMapIcon(i, MapIconMedic[playerid]);
}
return 1;
}

/*forward TimerCurad(playerid, i,Float, Float:y, Float:z);
public TimerCurad(playerid, i,Float, Float:y, Float:z)
{
if(!IsPlayerInRangeOfPoint(playerid, 2, x,y,z))
{
BarValue[playerid] = 0;
ClearAnimations(playerid);
HidePlayerProgressBar(playerid, MedicBar[playerid]);
HelpMedic = -1;
KillTimer(TimerBarMedic[playerid][0]);
KillTimer(TimerBarMedic[playerid][1]);
Controle(playerid, 1);
return SendClientMessage(playerid, COR_GRAD1, "Você não está perto do paciente.");
}
HidePlayerProgressBar(playerid, MedicBar[playerid]);
BarValue[playerid] = 0;
SetPlayerHealth(i, 100);
SetPlayerProgressBarValue(playerid, MedicBar[playerid], BarValue[playerid]);
ClearAnimations(playerid);
ClearAnimations(i);
Hemorragia = false;
GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid, -1, "Você ganhou {008000}R$ 1.000 {FFFFFF}por curar um ferido.");
new str[200];
Controle(i, 1);
Controle(playerid, 1);
format(str, sizeof(str), "*O Médico %s curou os ferimentos de %s.", PlayerName(playerid), PlayerName(i));
SendClientMessageInRange(30.0, playerid, str, 0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384 FFAA);
for(new p = 0; p < MAX_PLAYERS; p++)
{
RemovePlayerMapIcon(p, MapIconMedic);
}
HelpMedic = -1;
KillTimer(TimerHemo);
KillTimer(TimerBarMedic[playerid][0]);
KillTimer(TimerBarMedic[playerid][1]);
return 1;
}

forward ForceAnimMedic(playerid);
public ForceAnimMedic(playerid)
{
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle" ,4.1,0,1,1,0,0);
return 1;
}

forward ProgressBarMedic(playerid);
public ProgressBarMedic(playerid)
{
HidePlayerProgressBar(playerid, MedicBar[playerid]);
if(BarValue[playerid] < 100)
{
BarValue[playerid]++;
SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
ShowPlayerProgressBar(playerid, MedicBar[playerid]);
}
if(BarValue[playerid] >= 100)
{
BarValue[playerid] = 0;
SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
}
return 1;
}
IpsUnity is offline   Reply With Quote
Old 02/06/2020, 05:06 PM   #12
Uguinh0
Little Clucker
 
Join Date: Apr 2020
Posts: 25
Reputation: 0
Default Re: Sistema tipo do pub para samp

Quote:
Originally Posted by IpsUnity View Post
Variaveis Topo da GM

//---------------sistema de feridos By TIAGO_CARMO
new PlayerBar:MedicBar[MAX_PLAYERS], TimerBarMedic[MAX_PLAYERS][5],BarValue[MAX_PLAYERS] = 0, HelpMedic[MAX_PLAYERS] = -1;
new MapIconMedic[MAX_PLAYERS];
new Float:Health,
Curativos[MAX_PLAYERS],
bool:PlayerFerido[MAX_PLAYERS],
bool:Hemorragia[MAX_PLAYERS],
TimerHemo[MAX_PLAYERS];

================================================== ================================================== ===========

//public OnPlayerConnect<<<<<<<<<<<<<<<<

HelpMedic[playerid] = -1;
MedicBar[playerid] = CreatePlayerProgressBar(playerid, 291.00, 264.00, 55.50, 3.20, -16776961, 100.0);
HidePlayerProgressBar(playerid, MedicBar[playerid]);//sistema de feridos
SetPlayerProgressBarMaxValue(playerid, MedicBar[playerid], 40000);
KillTimer(TimerBarMedic[playerid][0]);
KillTimer(TimerBarMedic[playerid][1]);
BarValue[playerid] = 0;

================================================== ================================================== =============

public OnGameModeInit()<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <
{SetTimer("CheckLife", 100, true); //sistema de feridos

================================================== ================================================== ===============

//sistema de feridas
forward TempoSalvar(playerid);
public TempoSalvar(playerid)
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "* Você morreu de hemorragia.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
RemovePlayerMapIcon(i, MapIconMedic[playerid]);
}
return 1;
}

/*forward TimerCurad(playerid, i,Float, Float:y, Float:z);
public TimerCurad(playerid, i,Float, Float:y, Float:z)
{
if(!IsPlayerInRangeOfPoint(playerid, 2, x,y,z))
{
BarValue[playerid] = 0;
ClearAnimations(playerid);
HidePlayerProgressBar(playerid, MedicBar[playerid]);
HelpMedic = -1;
KillTimer(TimerBarMedic[playerid][0]);
KillTimer(TimerBarMedic[playerid][1]);
Controle(playerid, 1);
return SendClientMessage(playerid, COR_GRAD1, "Você não está perto do paciente.");
}
HidePlayerProgressBar(playerid, MedicBar[playerid]);
BarValue[playerid] = 0;
SetPlayerHealth(i, 100);
SetPlayerProgressBarValue(playerid, MedicBar[playerid], BarValue[playerid]);
ClearAnimations(playerid);
ClearAnimations(i);
Hemorragia = false;
GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid, -1, "Você ganhou {008000}R$ 1.000 {FFFFFF}por curar um ferido.");
new str[200];
Controle(i, 1);
Controle(playerid, 1);
format(str, sizeof(str), "*O Médico %s curou os ferimentos de %s.", PlayerName(playerid), PlayerName(i));
SendClientMessageInRange(30.0, playerid, str, 0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384 FFAA);
for(new p = 0; p < MAX_PLAYERS; p++)
{
RemovePlayerMapIcon(p, MapIconMedic);
}
HelpMedic = -1;
KillTimer(TimerHemo);
KillTimer(TimerBarMedic[playerid][0]);
KillTimer(TimerBarMedic[playerid][1]);
return 1;
}

forward ForceAnimMedic(playerid);
public ForceAnimMedic(playerid)
{
ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle" ,4.1,0,1,1,0,0);
return 1;
}

forward ProgressBarMedic(playerid);
public ProgressBarMedic(playerid)
{
HidePlayerProgressBar(playerid, MedicBar[playerid]);
if(BarValue[playerid] < 100)
{
BarValue[playerid]++;
SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
ShowPlayerProgressBar(playerid, MedicBar[playerid]);
}
if(BarValue[playerid] >= 100)
{
BarValue[playerid] = 0;
SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
}
return 1;
}
Boa tarde amigo teria como postar como código? Desse jeito fica bugado e gostaria de utilizar esse sistema
Uguinh0 is offline   Reply With Quote
Old 02/06/2020, 11:40 PM   #13
Vict9r
Big Clucker
 
Vict9r's Avatar
 
Join Date: Sep 2019
Posts: 96
Reputation: 8
Default Re: Sistema tipo do pub para samp

Quote:
Originally Posted by Uguinh0 View Post
Boa tarde amigo teria como postar como código? Desse jeito fica bugado e gostaria de utilizar esse sistema
Ta ae
pawn Code:
//---------------sistema de feridos By TIAGO_CARMO
new PlayerBar:MedicBar[MAX_PLAYERS], TimerBarMedic[MAX_PLAYERS][5],BarValue[MAX_PLAYERS] = 0, HelpMedic[MAX_PLAYERS] = -1;
new MapIconMedic[MAX_PLAYERS];
new Float:Health,
Curativos[MAX_PLAYERS],
bool:PlayerFerido[MAX_PLAYERS],
bool:Hemorragia[MAX_PLAYERS],
TimerHemo[MAX_PLAYERS];

================================================== ================================================== ===========

//public OnPlayerConnect<<<<<<<<<<<<<<<<
         HelpMedic[playerid] = -1;
         MedicBar[playerid] = CreatePlayerProgressBar(playerid, 291.00, 264.00, 55.50, 3.20, -16776961, 100.0);
         HidePlayerProgressBar(playerid, MedicBar[playerid]);//sistema de feridos
         SetPlayerProgressBarMaxValue(playerid, MedicBar[playerid], 40000);
         KillTimer(TimerBarMedic[playerid][0]);
         KillTimer(TimerBarMedic[playerid][1]);
         BarValue[playerid] = 0;

================================================== ================================================== =============

public OnGameModeInit()<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <
{
         SetTimer("CheckLife", 100, true); //sistema de feridos

================================================== ================================================== ===============

//sistema de feridas
forward TempoSalvar(playerid);
public TempoSalvar(playerid)
{
         SetPlayerHealth(playerid, 0.0);
         SendClientMessage(playerid, -1, "* Você morreu de hemorragia.");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
                  RemovePlayerMapIcon(i, MapIconMedic[playerid]);
         }
         return 1;
}

/*forward TimerCurad(playerid, i,Float, Float:y, Float:z);
public TimerCurad(playerid, i,Float, Float:y, Float:z)
{
         if(!IsPlayerInRangeOfPoint(playerid, 2, x,y,z))
         {
                  BarValue[playerid] = 0;
                  ClearAnimations(playerid);
                  HidePlayerProgressBar(playerid, MedicBar[playerid]);
                  HelpMedic = -1;
                  KillTimer(TimerBarMedic[playerid][0]);
                  KillTimer(TimerBarMedic[playerid][1]);
                  Controle(playerid, 1);
                  return SendClientMessage(playerid, COR_GRAD1, "Você não está perto do paciente.");
         }
         HidePlayerProgressBar(playerid, MedicBar[playerid]);
         BarValue[playerid] = 0;
         SetPlayerHealth(i, 100);
         SetPlayerProgressBarValue(playerid, MedicBar[playerid], BarValue[playerid]);
         ClearAnimations(playerid);
         ClearAnimations(i);
         Hemorragia = false;
         GivePlayerMoney(playerid, 1000);
         SendClientMessage(playerid, -1, "Você ganhou {008000}R$ 1.000 {FFFFFF}por curar um ferido.");
         new str[200];
         Controle(i, 1);
         Controle(playerid, 1);
         format(str, sizeof(str), "*O Médico %s curou os ferimentos de %s.", PlayerName(playerid), PlayerName(i));
         SendClientMessageInRange(30.0, playerid, str, 0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384 FFAA);
         for(new p = 0; p < MAX_PLAYERS; p++)
         {
                  RemovePlayerMapIcon(p, MapIconMedic);
         }
         HelpMedic = -1;
         KillTimer(TimerHemo);
         KillTimer(TimerBarMedic[playerid][0]);
         KillTimer(TimerBarMedic[playerid][1]);
         return 1;
}

forward ForceAnimMedic(playerid);
public ForceAnimMedic(playerid)
{
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle" ,4.1,0,1,1,0,0);
         return 1;
}

forward ProgressBarMedic(playerid);
public ProgressBarMedic(playerid)
{
         HidePlayerProgressBar(playerid, MedicBar[playerid]);
         if(BarValue[playerid] < 100)
         {
                  BarValue[playerid]++;
                  SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
                  ShowPlayerProgressBar(playerid, MedicBar[playerid]);
         }
         if(BarValue[playerid] >= 100)
         {
                  BarValue[playerid] = 0;
                  SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
         }        
         return 1;
}
__________________
HostName: [RP] Brasileiros Online | Samp Mobile
Address: 104.210.147.139:7777
Players: XX / 500
Ping: 153
Mode: BORP v1.1
Language: -
DISCORD: https://discord.gg/g6ZVQZC
Vict9r is offline   Reply With Quote
Old 03/06/2020, 03:36 PM   #14
Uguinh0
Little Clucker
 
Join Date: Apr 2020
Posts: 25
Reputation: 0
Default Re: Sistema tipo do pub para samp

Quote:
Originally Posted by Vict9r View Post
Ta ae
pawn Code:
//---------------sistema de feridos By TIAGO_CARMO
new PlayerBar:MedicBar[MAX_PLAYERS], TimerBarMedic[MAX_PLAYERS][5],BarValue[MAX_PLAYERS] = 0, HelpMedic[MAX_PLAYERS] = -1;
new MapIconMedic[MAX_PLAYERS];
new Float:Health,
Curativos[MAX_PLAYERS],
bool:PlayerFerido[MAX_PLAYERS],
bool:Hemorragia[MAX_PLAYERS],
TimerHemo[MAX_PLAYERS];

================================================== ================================================== ===========

//public OnPlayerConnect<<<<<<<<<<<<<<<<
         HelpMedic[playerid] = -1;
         MedicBar[playerid] = CreatePlayerProgressBar(playerid, 291.00, 264.00, 55.50, 3.20, -16776961, 100.0);
         HidePlayerProgressBar(playerid, MedicBar[playerid]);//sistema de feridos
         SetPlayerProgressBarMaxValue(playerid, MedicBar[playerid], 40000);
         KillTimer(TimerBarMedic[playerid][0]);
         KillTimer(TimerBarMedic[playerid][1]);
         BarValue[playerid] = 0;

================================================== ================================================== =============

public OnGameModeInit()<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <
{
         SetTimer("CheckLife", 100, true); //sistema de feridos

================================================== ================================================== ===============

//sistema de feridas
forward TempoSalvar(playerid);
public TempoSalvar(playerid)
{
         SetPlayerHealth(playerid, 0.0);
         SendClientMessage(playerid, -1, "* Você morreu de hemorragia.");
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
                  RemovePlayerMapIcon(i, MapIconMedic[playerid]);
         }
         return 1;
}

/*forward TimerCurad(playerid, i,Float, Float:y, Float:z);
public TimerCurad(playerid, i,Float, Float:y, Float:z)
{
         if(!IsPlayerInRangeOfPoint(playerid, 2, x,y,z))
         {
                  BarValue[playerid] = 0;
                  ClearAnimations(playerid);
                  HidePlayerProgressBar(playerid, MedicBar[playerid]);
                  HelpMedic = -1;
                  KillTimer(TimerBarMedic[playerid][0]);
                  KillTimer(TimerBarMedic[playerid][1]);
                  Controle(playerid, 1);
                  return SendClientMessage(playerid, COR_GRAD1, "Você não está perto do paciente.");
         }
         HidePlayerProgressBar(playerid, MedicBar[playerid]);
         BarValue[playerid] = 0;
         SetPlayerHealth(i, 100);
         SetPlayerProgressBarValue(playerid, MedicBar[playerid], BarValue[playerid]);
         ClearAnimations(playerid);
         ClearAnimations(i);
         Hemorragia = false;
         GivePlayerMoney(playerid, 1000);
         SendClientMessage(playerid, -1, "Você ganhou {008000}R$ 1.000 {FFFFFF}por curar um ferido.");
         new str[200];
         Controle(i, 1);
         Controle(playerid, 1);
         format(str, sizeof(str), "*O Médico %s curou os ferimentos de %s.", PlayerName(playerid), PlayerName(i));
         SendClientMessageInRange(30.0, playerid, str, 0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384FFAA,0xB384 FFAA);
         for(new p = 0; p < MAX_PLAYERS; p++)
         {
                  RemovePlayerMapIcon(p, MapIconMedic);
         }
         HelpMedic = -1;
         KillTimer(TimerHemo);
         KillTimer(TimerBarMedic[playerid][0]);
         KillTimer(TimerBarMedic[playerid][1]);
         return 1;
}

forward ForceAnimMedic(playerid);
public ForceAnimMedic(playerid)
{
         ApplyAnimation(playerid,"BOMBER","BOM_Plant_2Idle" ,4.1,0,1,1,0,0);
         return 1;
}

forward ProgressBarMedic(playerid);
public ProgressBarMedic(playerid)
{
         HidePlayerProgressBar(playerid, MedicBar[playerid]);
         if(BarValue[playerid] < 100)
         {
                  BarValue[playerid]++;
                  SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
                  ShowPlayerProgressBar(playerid, MedicBar[playerid]);
         }
         if(BarValue[playerid] >= 100)
         {
                  BarValue[playerid] = 0;
                  SetPlayerProgressBarValue(playerid, MedicBar[playerid],BarValue[playerid]);
         }        
         return 1;
}
Vlw amigo
Uguinh0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Qual o melhor sistema operacional linux para samp? neymar1477 Português/Portuguese 9 28/01/2015 11:08 AM
[Pedido] Este tipo de sistema é Possível? jamaica90 Português/Portuguese 10 05/10/2014 04:50 AM
[Pedido] Sistema de casa tipo Ahouse em Strcmp. DownGrade Português/Portuguese 2 29/01/2014 11:37 PM
[Ajuda] Qual o melhor Tipo de Gm Para iniciantes ? Wendell Português/Portuguese 19 19/10/2012 08:29 PM
[Ajuda] Como criar GZ para um tipo de Org Hugo_Almeida Português/Portuguese 1 25/12/2011 11:21 AM


All times are GMT. The time now is 05:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.