2 operators that i don't understand
#9

you have to use them in a function or in a return, the way you use it, it will not work.
I'll show some examples how to use it:

pawn Код:
public OnPlayerSpawn(playerid)
{
  GivePlayerMoney(playerid, (GetPlayerMoney(playerid) > 0 ? 0 : 500) );
  return 1;
}
what does it do? when the player has money (PLAYER_MONEY is bigger then 0) it gives nothing (0) else it gives 500

pawn Код:
stock IsPlayerSpawned(playerid)
return (IsPlayerConnected(playerid) && playerinfo[playerid][spawned] ? 1 : 0);
what does it do? if the player is connected and spawned it returns 1 else 0

child's play.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)