whats wrong here? help plz
#1

if(strcmp(cmd, "/fselldrugs", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Farmer!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fselldrugs [playerid/PartOfName] [ammount] [price]");
return 1;
}
new playa;
new money;
new needed;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { return 1; }
needed = strval(tmp);
if(needed < 1 || needed > 99) { SendClientMessage(playerid, COLOR_GREY, " Grams not lower then 1, or above 99!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) { return 1; }
money = strval(tmp);
if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 99999!"); return 1; }
if(needed > PlayerInfo[playerid][pDrugs]) { SendClientMessage(playerid, COLOR_GREY, " You dont have that much Drugs with you !"); return 1; }
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, playa))
{
if(playa == playerid)
{
SendClientMessage(playerid, COLOR_GREY, " Cant sell to yourself!");
return 1;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You offerd %s to buy %d gram of drugs for $%d .", giveplayer, needed, money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Farmer %s wants to sell you %d gram for $%d, (type /accept drugs) to buy.", sendername, needed, money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
DrugOffer[playa] = playerid;
DrugPrice[playa] = money;
DrugGram[playa] = needed;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Acel Player nu este langa tine !");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Acel Player este Offline.");
}
}
return 1;
}

its sayd im not a farmer ?? why help plz
Reply
#2

pawn Код:
if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) //Checks if the person leads this group or is a member of this group.
          {
                SendClientMessage(playerid, COLOR_GREY, " You are not a Farmer!");
                return 1;
          }
Reply
#3

yeah ty for try but its still dont work
Reply
#4

Quote:
Originally Posted by Hiddos
pawn Код:
if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) //Checks if the person leads this group or is a member of this group.
          {
                SendClientMessage(playerid, COLOR_GREY, " You are not a Farmer!");
                return 1;
          }
pawn Код:
if(!PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) //Checks if the person leads this group or is a member of this group.
          {
                SendClientMessage(playerid, COLOR_GREY, " You are not a Farmer!");
                return 1;
          }
Reply
#5

now i go try i hope its works
Reply
#6

damn... still dont work
Reply
#7

help plz? anyone?
Reply
#8

Be patient.

Did you restart your gamemode?
Reply
#9

yeah i restarted computer too
Reply
#10

pawn Код:
if(PlayerInfo[playerid][pMember] != 16 && PlayerInfo[playerid][pLeader] != 16)
            {
                SendClientMessage(playerid, COLOR_GREY, "  You are not a Farmer!");
                return 1;
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)