Little help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help! (
/showthread.php?tid=470896)
Little help! -
Sanady - 20.10.2013
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.
Re: Little help! - Patrick - 20.10.2013
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
Re: Little help! -
Sanady - 20.10.2013
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...
Re: Little help! - Patrick - 20.10.2013
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?
Re: Little help! -
Sanady - 20.10.2013
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