Jump to content
  • 0

pomoc (help) zdraví "přesně"


Cz_Ritch

Dotaz

čaaaaaaau heledte ja bych potřeboval toto ale jako že:

dá mu to zdraví to vsechno !!!ALE!!! musí mít nad 5000 cashu jinak mu to neproda

 

{

if(strcmp(cmdtext, "/zdraví", true) == 0) {

SetPlayerHealth(playerid, 100.0);

GivePlayerMoney(playerid, -5000)

}

else

{

SendClientMessage(playerid, 0xFFFFFFAA, "**nemužeš si přivolat doktora kdys ani nemáš peníze.. SOCKO!! !!!.");

return 1;

}

 

no ale nevim co za else dat nebo jestli tam to else vubec ma bejt...

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0
čaaaaaaau heledte ja bych potřeboval toto ale jako že:

dá mu to zdraví to vsechno !!!ALE!!! musí mít nad 5000 cashu jinak mu to neproda

 

{

if(strcmp(cmdtext, "/zdraví", true) == 0) {

SetPlayerHealth(playerid, 100.0);

GivePlayerMoney(playerid, -5000)

}

else

{

SendClientMessage(playerid, 0xFFFFFFAA, "**nemužeš si přivolat doktora kdys ani nemáš peníze.. SOCKO!! !!!.");

return 1;

}

 

no ale nevim co za else dat nebo jestli tam to else vubec ma bejt...

 

Skus takhle:

 

if(strcmp(cmdtext, "/zdraví", true) == 0) 
{
if(GetPlayerMoney(playerid) < 4999) { return SendClientMessage(playerid, COLOR_RED, "Nemáš peníze [ 5000,- ].");
}else
GivePlayerMoney(playerid,-5000);
SetPlayerHealth(playerid, 100.0);
}

Link to comment
Share on other sites

  • 0
jj fungu je to.. dík a hele prosímtě.. Muzu se zeptat co to je
< 4999

dík...

 

if(neco < 4999) 

 

pokud je neco mensi nez 4999

 

<

>

=

 

To jste se ucili v 4 tride ve skole ne? :d

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...