A bit of nooby help. - 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: A bit of nooby help. (
/showthread.php?tid=95949)
A bit of nooby help. -
Sal_Kings - 05.09.2009
Hello, Someone please help me do this .. I have NO IDEA on how to do it..
If a player has 1
And 1
And he types /drawart
It will take away 1
and 1
And he will get
Re: A bit of nooby help. -
Sal_Kings - 05.09.2009
Anyone/
Re: A bit of nooby help. -
BlackFoX - 05.09.2009
where is the problem , PENCIL[playerid]--; and PAPER[playerid]--;
Re: A bit of nooby help. -
Sal_Kings - 05.09.2009
What? ..
There is no problem i am asking if someone can help me do this.
Re: A bit of nooby help. -
Clavius - 05.09.2009
PENCIL[playerid]--; will decrease it by one, same for PAPER[playerid]--;
and ART[playerid]++; will increase it by one.
Now you just have to make the /drawart command, and don't forget to check if the PENCIL[playerid] and PAPER[playerid] are not less than 1
Re: A bit of nooby help. -
BlackFoX - 05.09.2009
Код:
if (strcmp("/draw", cmdtext, true) == 0)
{
if(!PENCIL[playerid])return SendClientMessage(playerid,0xFFFFFFFF,"You need more Pencils!");
if(!PAPER[playerid])return SendClientMessage(playerid,0xFFFFFFFF,"You need more Papers!");
PENCIL[playerid]--;
PAPER[playerid]--;
ART[playerid]++;
SendClientMessage(playerid,0xFFFFFFFF,"You drawing a Picture...");
return 1;
}