It doesen't work
#1

Код:
CMD:checkdrugs(playerid, params[])
{
	new string[100];
	new string2[100];
75	Heroin[playerid];
76	Weed[playerid];
    format(string, sizeof(string), "Имаш %s Хероин", Heroin[playerid]);
    format(string2, sizeof(string2), "Имаш %s Трева", Weed[playerid]);
    SendClientMessage(playerid, -1, string);
    SendClientMessage(playerid, -1, string2);
    return 1;
}
i am typing /checkdrugs and when i type it doesn't show a number Help

it says You have Weed
Reply
#2

D:\igri\GTA-SanAndreas\pawno\Untitled.pwn(75) : warning 215: expression has no effect
D:\igri\GTA-SanAndreas\pawno\Untitled.pwn(76) : warning 215: expression has no effect

Theese are

Heroin[playerid]; and Weed[playerid];
Reply
#3

What the heck is
pawn Код:
75 Heroin[MAX_PLAYERS];
Reply
#4

to show you were is the error
Reply
#5

pawn Код:
CMD:checkdrugs(playerid)
{
    new string[70];
    format(string, sizeof(string), "Имаш %s Хероин", Heroin[playerid]);
    SendClientMessage(playerid, -1, string);
   format(string, sizeof(string), "Имаш %s Трева", Weed[playerid]);
    SendClientMessage(playerid, -1, string);
    return 1;
}
I think you already have declared Heroin as a var, so no need to declare it once more. If you haven't, add:
pawn Код:
new Heroin[MAX_PLAYERS],
      Weed[MAX_PLAYERS];
on the top, or wherever you need it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)