15.10.2012, 10:48
Quote:
Which is more save in energy?
This include or that one, Emmet_ Not sure maybe the same. Anyway thanks. |
pawn Код:
public OnPlayerConnect(playerid)
{
varSpawn[playerid] = FIRST_SPAWN;
return 1;
}
You should do it like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
if (varSpawn[playerid] < 2)
{
varSpawn[playerid] ++;
}
return CallLocalFunction("OnPlayerSpawnEx", "dd", playerid, varSpawn[playerid]);
}
pawn Код:
#define IsPlayerSpawned(%0) varSpawn[%0]
pawn Код:
public OnPlayerSpawn(playerid)
{
if (IsPlayerSpawned(playerid) == FIRST_SPAWN)
{
// Spawned for the first time
}
More code here...
return 1;
}