30.03.2013, 18:20
Hey I Wrote a Script and I want to know if itґs ok.
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 10000)
{
SendClientMessage(playerid, 0xAA3333AA, "You donґt have enough money!");
return 1;
}
if(GetPlayerHealth(playerid) == 100)
{
SendClientMessage(playerid, 0xAA3333AA, "Your Health Is 100!");
GivePlayerMoney(playerid,0);
SetPlayerHealth(playerid,100);
return 1;
}
if(GetPlayerMoney(playerid) > 10000)
if(GetPlayerHealth(playerid) == 100)
{
GivePlayerMoney(playerid,-10000);
SetPlayerHealth(playerid,100);
return 1;
}
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 10000)
{
SendClientMessage(playerid, 0xAA3333AA, "You donґt have enough money!");
return 1;
}
if(GetPlayerHealth(playerid) == 100)
{
SendClientMessage(playerid, 0xAA3333AA, "Your Health Is 100!");
GivePlayerMoney(playerid,0);
SetPlayerHealth(playerid,100);
return 1;
}
if(GetPlayerMoney(playerid) > 10000)
if(GetPlayerHealth(playerid) == 100)
{
GivePlayerMoney(playerid,-10000);
SetPlayerHealth(playerid,100);
return 1;
}
}