01.05.2013, 00:30
Just change iAmount and iId in case DIALOG_SELLDRUGS to something else and change it in that dialog to match. Like this:
PHP код:
case DIALOG_SELLDRUGS:
{
if(!response)
{
return 1;
}
if(response)
{
new Amount, pID;
Amount = GetPVarInt(playerid, "iAmount");
pID = GetPVarInt(playerid, "iId"); //Now we are simply getting the player variables which we stored in the command.
DeletePVar(playerid, "iAmount");
DeletePVar(playerid, "iId"); //Just deleting the player variables since we are no longer using them.
PlayerInfo[playerid][pDrugs]--;
PlayerInfo[pID][pDrugs]++;
GivePlayerMoney(playerid, Amount);
GivePlayerMoney(pID, - Amount);
}
return 1;
}