19.02.2013, 18:20
When player logs out, if the player has a timer on or a PVar, it will stop automatically? or i'll have to killtimer
forward Timer(playerid);
public Timer(playerid)
{
if(!IsPlayerConnected(playerid))return KillTimer(YourTimer);
}
public OnPlayerDisconnect(playerid)
{
SetPVarInt(playerid, "MyVar", 0);
//.......
public OnPlayerSpawn(playerid) { if(GetIntVar(playerid, "gLogged") != 1) { KickEx(playerid, "[SERVER]: You must be logged in to spawn!"); } if(GetIntVar(playerid, "JustDied") == 1) { PutPlayer(playerid, PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); ClearAnimations(playerid); ApplyAnimation(playerid, "CRACK", "crckdeth1", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack return 1; } return 1; }