29.10.2009, 16:10
Hey,
I wanna create a /givedrugs command.
I have this array:
drugs[MAX_PLAYERS];
I want that it works like this:
but how can I make that if you typ let's say: /givedrugs 10
id = 10;
Does anyone knows how to fix this?
And tell me if you need more info ...
Dirk
I wanna create a /givedrugs command.
I have this array:
drugs[MAX_PLAYERS];
I want that it works like this:
pawn Код:
// on /givedrugs [id]
{
if (drugs[playerid] >= 1)
{
drugs[playerid] -= 1;
drugs[id] += 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You don't have any drugs!")
}
return 1;
}
id = 10;
Does anyone knows how to fix this?
And tell me if you need more info ...
Dirk