27.08.2012, 11:52
Hi, im using this stock i've made:
And i want to use it like this:
Is this possible? How?
pawn Code:
stock GivePlayerDrugs(playerid, amount)
{
new formatt[64];
if(PlayerInfo[playerid][pDrugs]+amount > MAX_DRUGS)
{
format(formatt, sizeof(formatt), "You cant carry that much drugs! (Limit: %d grams)", MAX_DRUGS);
return SendMessage(playerid, MSG_ERROR, formatt);
}
else
{
PlayerInfo[playerid][pDrugs] += amount;
format(formatt, sizeof(formatt), " *** %s grabs some drugs..", PlayerName(playerid));
return SendLocalMessage(playerid, COLOR_PURPLE, formatt);
}
}
pawn Code:
CMD(playerid, params[])
{
GivePlayerDrugs(playerid, 100); // So if player cant carry that much drugs,
OtherFunc(playerid); //--------// then this function and all below wont be called.
AnotherFunction();
return 1;
}