Little help!
#1

Hello everybody.Today I want to present my server on SAMP forum but still have some bugs which is little complicated to me.I don`t see any problem there.Maybe you will see mistake.I made today new job delivering ammo to old ammofactory but when I deliver it it`s says I don`t own Drug house not factory (drug house is different zone)...So here is the code:

pawn Код:
if(GangZones[4][OwnerTeam] != GetPlayerTeam(playerid)) return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[Drug - House] "embed_white"Comps in drug house are not filled becouse you don`t own drug house.Own it and then comps will be filled!");
            {
                if(RandomJobCP[0][JobID])
                {
                    DrugStats += 20;
                    format(slova,sizeof(slova),"[Drug - House] "embed_white"Amount of comps in drug house is %d !",DrugStats);
                    SendClientMessage(playerid,0xFFD900FF,slova);
                }
            }
            if(GangZones[9][OwnerTeam] != GetPlayerTeam(playerid)) return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[Ammunation - Factory] "embed_white"Comps in old ammunation factory are not filled becouse you don`t own ammunation factory.Own it and then comps will be filled!");
            {
                if(RandomJobCP[1][JobID])
                {
                    WeaponStats += 20;
                    format(slova,sizeof(slova),"[Ammunation - Factory] "embed_white"Amount of comps in ammunation factory is %d !",DrugStats);
                    SendClientMessage(playerid,0xFFD900FF,slova);
                }
            }
Please help me fast.
Reply
#2

Are you sure this code is right?, please re-check.

pawn Код:
if(GangZones[4][OwnerTeam] != GetPlayerTeam(playerid))
And
pawn Код:
if(GangZones[9][OwnerTeam] != GetPlayerTeam(playerid))
Or, try these code
pawn Код:
if(GangZones[4][OwnerTeam] == GetPlayerTeam(playerid))
{
    if(RandomJobCP[0][JobID])
    {
        DrugStats += 20;
        format(slova,sizeof(slova),"[Drug - House] "embed_white"Amount of comps in drug house is %d !",DrugStats);
        SendClientMessage(playerid,0xFFD900FF,slova);
    }
} else return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[Drug - House] "embed_white"Comps in drug house are not filled becouse you don`t own drug house.Own it and then comps will be filled!");
if(GangZones[9][OwnerTeam] == GetPlayerTeam(playerid))
{
    if(RandomJobCP[1][JobID])
    {
        WeaponStats += 20;
        format(slova,sizeof(slova),"[Ammunation - Factory] "embed_white"Amount of comps in ammunation factory is %d !",DrugStats);
        SendClientMessage(playerid,0xFFD900FF,slova);
    }
} else return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[Ammunation - Factory] "embed_white"Comps in old ammunation factory are not filled becouse you don`t own ammunation factory.Own it and then comps will be filled!");
I've experienced this before, using return with brackets
Reply
#3

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
Are you sure this code is right?, please re-check.

pawn Код:
if(GangZones[4][OwnerTeam] != GetPlayerTeam(playerid))
And
pawn Код:
if(GangZones[9][OwnerTeam] != GetPlayerTeam(playerid))
Or, try these code
pawn Код:
if(GangZones[4][OwnerTeam] == GetPlayerTeam(playerid))
{
    if(RandomJobCP[0][JobID])
    {
        DrugStats += 20;
        format(slova,sizeof(slova),"[Drug - House] "embed_white"Amount of comps in drug house is %d !",DrugStats);
        SendClientMessage(playerid,0xFFD900FF,slova);
    }
} else return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[Drug - House] "embed_white"Comps in drug house are not filled becouse you don`t own drug house.Own it and then comps will be filled!");
if(GangZones[9][OwnerTeam] == GetPlayerTeam(playerid))
{
    if(RandomJobCP[1][JobID])
    {
        WeaponStats += 20;
        format(slova,sizeof(slova),"[Ammunation - Factory] "embed_white"Amount of comps in ammunation factory is %d !",DrugStats);
        SendClientMessage(playerid,0xFFD900FF,slova);
    }
} else return SendClientMessage(playerid,0xFFFFFFF,""embed_red"[Ammunation - Factory] "embed_white"Comps in old ammunation factory are not filled becouse you don`t own ammunation factory.Own it and then comps will be filled!");
I've experienced this before, using return with brackets
Uhh it`s not problem in that problem is in that I need to detect in which zone is player...
Reply
#4

Quote:
Originally Posted by Sanady
Посмотреть сообщение
Uhh it`s not problem in that problem is in that I need to detect in which zone is player...
I can't understand you man, to be honest your English doesn't make sense (no offence), Do you have #include <a_zones> or Zones Array in your script?

EDIT: Did you even try the code I gave you if it did work?
Reply
#5

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
I can't understand you man, to be honest your English doesn't make sense (no offence), Do you have #include <a_zones> or Zones Array in your script?

EDIT: Did you even try the code I gave you if it did work?
Look I am not using that include I made system for capturing gangzones I try and problem is in zones I found problem and I am trying to fix it.Thanks for reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)