How to make "if" or command in one script?
#1

I mean...

I want to make like that:

Код:
new color;
color = GetPlayerColor(playerid);
if (color != COLOR_GREEN)
{
SendClientMessage(playerid, COLOR_RED, "Error: You are not a medic.");
}
else
{
SetPlayerHealth(playerid, 100);
return 1;
}
Alright... I want it to be Color Green OR Color Yellow. What do I do?!

Thanks.
Reply
#2

Код:
new color;
color = GetPlayerColor(playerid);
if (color != COLOR_GREEN || color != COLOR_YELLOW)
{
SendClientMessage(playerid, COLOR_RED, "Error: You are not a medic.");
}
else
{
SetPlayerHealth(playerid, 100);
return 1;
}
Should work
Reply
#3

or read the wiki
Reply
#4

Thanks so much!!

It worked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)