27.06.2012, 11:05
I have if(GetPlayerSkin(playerid) == 125) and if(GetPlayerColor(playerid) == COLOR_RED) How to do "else" them? If there is one "if" that i can do, but if there is two "if" I do not know.
if(GetPlayerSkin(playerid) == 125)
{
//do something here
}
else
{
//do something here
return 1;
}
if(GetPlayerColor(playerid) == COLOR_RED)
{
//do something here
}
else
{
//do something here
return 1;
}
if(GetPlayerSkin(playerid) == 125 && GetPlayerColor(playerid) == COLOR_RED)
{
//do something here
}
else
{
// do something here
return 1;
}
if(GetPlayerSkin(playerid) == 125 && GetPlayerColor(playerid) == COLOR_RED)
if(GetPlayerSkin(playerid) == 125 )
{
//..code
}
else if( GetPlayerColor(playerid) == COLOR_RED)
if(GetPlayerSkin(playerid) == 125 && GetPlayerColor(playerid) == COLOR_RED)
if(GetPlayerSkin(playerid) == 125 && GetPlayerColor(playerid) == COLOR_RED)
{
//do something
return 1;
}
if(GetPlayerSkin(playerid) == 125 && GetPlayerColor(playerid) == COLOR_RED)
{
// Your code if the player does have them both.
return 1;
}
else
{
// Your code if the player doesn't have one of them.
return 1;
}
// ------------------------------------------------------------- //
if(GetPlayerSkin(playerid) == 125)
{
// Your code if the player does have the skin.
return 1;
}
else
{
// If not.
return 1;
}
if(GetPlayerColor(playerid) == COLOR_RED)
{
// Your code if the player does have color.
return 1;
}
else
{
// If not.
return 1;
}