Sorry For The Triple Post
Ok I Officially converted GF drug system into mine that includes stoned system /accept drugs, /selldrugs and /usedrugs
now everything works right except when i sell the drugs it says it goes to my paycheck and i dont get the money
now this may seem weird but the problem isnt with /selldrugs its with /accept drugs because when he accepts them then it should send the money over heres the code modded by me
Код:
if(strcmp(cmd,"/accept",true)==0)
{
if(IsPlayerConnected(playerid))
{
new x_job[256];
x_job = strtok(cmdtext, idx);
if(!strlen(x_job)) {
SendClientMessage(playerid, COLOR_WHITE, "|__________________ Accept __________________|");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: accept [name]");
SendClientMessage(playerid, COLOR_GRAY, "Available names: Drugs,");
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
if(strcmp(x_job,"drugs",true) == 0)
{
if(DrugOffer[playerid] < 999)
{
if(GetPlayerMoney(playerid) > DrugPrice[playerid])
{
if(PlayerInfo[playerid][pDrugs] < 7)
{
if(IsPlayerConnected(DrugOffer[playerid]))
{
GetPlayerName(DrugOffer[playerid], giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You bought %d gram for $%d from Drug Dealer %s.",DrugGram[playerid],DrugPrice[playerid],giveplayer);
SendClientMessage(playerid, COLOR_BLUELIGHT, string);
format(string, sizeof(string), "* %s has bought your %d gram, the $%d was added to your PayCheck.",sendername,DrugGram[playerid],DrugPrice[playerid]);
SendClientMessage(DrugOffer[playerid], COLOR_BLUELIGHT, string);
GivePlayerMoney(playerid, -DrugPrice[playerid]);
PlayerInfo[playerid][pDrugs] += DrugGram[playerid];
PlayerInfo[DrugOffer[playerid]][pDrugs] -= DrugGram[playerid];
DrugOffer[playerid] = 999;
DrugPrice[playerid] = 0;
DrugGram[playerid] = 0;
return 1;
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAY, " You are fully loaded with Drugs, use them first !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAY, " You can't afford those Drugs !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAY, " No-one offerd you any Drugs !");
return 1;
}
}
please any help will be freaking helpful obviously but i would announce to samp forums "I LOVE (HELPER'S NAME HERE)!!!!!