A bit of nooby help.
#1

Hello, Someone please help me do this .. I have NO IDEA on how to do it..

If a player has 1
Код:
PENCIL[playerid]
And 1
Код:
PAPER[playerid]
And he types /drawart

It will take away 1
Код:
PENCIL[playerid]
and 1
Код:
PAPER[playerid]
And he will get
Код:
ART[playerid] += 1;
Reply
#2

Anyone/
Reply
#3

where is the problem , PENCIL[playerid]--; and PAPER[playerid]--;
Reply
#4

What? ..
There is no problem i am asking if someone can help me do this.
Reply
#5

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
Reply
#6

Код:
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;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)