Help Me With This - 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: Help Me With This (
/showthread.php?tid=655754)
Help Me With This -
Istrator - 29.06.2018
Can anyone help me with this codes? There must be a Text shows "Hero Field" and Remove Weapons on Zombies when it hits that Advanced Hero near that Advanced Hero.
Код:
if(team[issuerid] == TEAM_HUMAN)
{
if(pInfo[issuerid][pHumanClass] == ADVANCEDHERO)
{
if(team[playerid] == TEAM_ZOMBIE)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(issuerid, Float:x, Float:y, Float:z);
if(IsPlayerInRangeOfPoint(playerid, 3.0, Float:x, Float:y, Float:z))
{
if(weaponid == 9)
{
GameTextForPlayer(playerid, "~g~Hero Field", 1000, 3);
ResetPlayerWeapons(playerid);
}
}
}
}
}
I need help AS FAST AS POSSIBLE. I don't need a bad comment nor disclaimers.
Re: Help Me With This -
Sasino97 - 29.06.2018
Please, use a less generic title next time, otherwise nobody is gonna open your post.
When is that code executed? OnPlayerDeath?
Also, unrelated to your problem, I suggest you to use the and operator (&&) instead of making multiple nested
ifs except when it is necessary.
Re: Help Me With This -
Istrator - 30.06.2018
Sorry for it. BTW, I fixed this. Please close this thread.
Thank you.