26.02.2009, 19:36
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:
what does it do? when the player has money (PLAYER_MONEY is bigger then 0) it gives nothing (0) else it gives 500
what does it do? if the player is connected and spawned it returns 1 else 0
child's play.
I'll show some examples how to use it:
pawn Код:
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid, (GetPlayerMoney(playerid) > 0 ? 0 : 500) );
return 1;
}
pawn Код:
stock IsPlayerSpawned(playerid)
return (IsPlayerConnected(playerid) && playerinfo[playerid][spawned] ? 1 : 0);
child's play.

