little problem with my command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: little problem with my command (
/showthread.php?tid=124241)
little problem with my command -
Face9000 - 29.01.2010
Hi guys i have a problem.
I have created a command.
If you type /ha u will pay 10,000$ and you can have full armour/health BUT i need help.
I wont make that if the player dont have money (in this case 10,000$) it will shown an error message.
Here is the command.
Код:
if(strcmp(cmdtext, "/ha", true)==0)
{
SendPlayerFormattedText(playerid, "Thank you for using the /ha command.Now your armour and your health will be set to 100 (FULL).The cost is 10.000$", 0);
GivePlayerMoney(playerid, -10000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
return 1;
}
Thanks.
P.S. Sorry for my english but im italian!
Re: little problem with my command -
Finn - 29.01.2010
pawn Код:
if(strcmp(cmdtext, "/ha", true) == 0)
{
if(GetPlayerMoney(playerid) >= 10000)
{
GivePlayerMoney(playerid, -10000);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
return SendClientMessage(playerid, 0xFFFFFFFF, "Thank you for using the /ha command.Now your armour and your health will be set to 100 (FULL).The cost is 10.000$");
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "You need $10000 to use this command.");
}
Re: little problem with my command -
Face9000 - 29.01.2010
I LOVE YOU!
Thanks man!!