This is a good example if you want to practice ternary operators - e.g :
new
bool: g_pGod[ MAX_PLAYERS ];
CMD:god( playerid, params[ ] )
{
g_pGod[ playerid ] = !g_pGod[ playerid ]; // This is why I love booleans :3
SetPlayerHealth(
playerid,
( g_pGod[ playerid ] ) ? ( Float: 0x7F800000 ) : ( -1.0 )
);
SendClientMessage(
playerid,
-1,
( g_pGod[ playerid ] ) ? ( "Godmode turned on!" ) : ( "Godmode turned off!" )
);
return true;
}