I don't know how to solve - 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: I don't know how to solve (
/showthread.php?tid=300297)
I don't know how to solve -
cotyzor - 29.11.2011
Код:
else if(PlayerToPoint(3, i, -1040.9595,-1167.0739,129.2825))
{
if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3) // Army
{
SetPlayerHealth(i, 100);
GameTextForPlayer(i,"~r~Health 100%", 3000, 5);
}
else if
{
SendClientMessage(i, COLOR_LIGHTBLUE, "* You are not from Army");
}
}
Why doesn't work ?
Re: I don't know how to solve -
BoboRi - 29.11.2011
why do you have the else if before the second SendClientMessage?
Re: I don't know how to solve -
cotyzor - 29.11.2011
If you go through that point and you aren't part of the army, display that message
I don't know how to make, i tried ... can help me please ?
Re: I don't know how to solve -
BoboRi - 29.11.2011
firstly remove the else if thing's if there are not neccessary and here on this last thing they aren't neccessary...
If it still doesen't work we will try something else
Re: I don't know how to solve -
park4bmx - 29.11.2011
so hard to show him ?
pawn Код:
else if(PlayerToPoint(3, i, -1040.9595,-1167.0739,129.2825))
{
if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3) // Army
{
SetPlayerHealth(i, 100);
GameTextForPlayer(i,"~r~Health 100%", 3000, 5);
}
else return SendClientMessage(i, COLOR_LIGHTBLUE, "* You are not from Army");
}
OR
pawn Код:
else if(PlayerToPoint(3, i, -1040.9595,-1167.0739,129.2825))
{
if(PlayerInfo[playerid][pLeader] < 3 || PlayerInfo[playerid][pMember] < 3) return SendClientMessage(i, COLOR_LIGHTBLUE, "* You are not from Army");
//if the player is bellow pLead & pMemmber level 3 the message will show up
SetPlayerHealth(i, 100);
GameTextForPlayer(i,"~r~Health 100%", 3000, 5);
}
Re: I don't know how to solve -
cotyzor - 03.12.2011
Thanks,
TOPIC CLOSED