new bool:DID_IJUSTDIE[MAX_PLAYERS];
new Float:MYCOOL_COORDS[MAX_PLAYERS][4];
public OnPlayerSpawn(playerid)
{
if(DID_IJUSTDIE[playerid])
SetPlayerPos(playerid, MYCOOL_COORDS[playerid][0], MYCOOL_COORDS[playerid][1], MYCOOL_COORDS[playerid][2]),
SetPlayerFacingAngle(playerid, MYCOOL_COORDS[playerid][3]),
TogglePlayerControllable(playerid, false),
DID_IJUSTDIE[playerid] = false;
return 1;
}
public OnPlayerDeath(playerid)
{
DID_IJUSTDIE[playerid] = true;
GetPlayerPos(playerid, MYCOOL_COORDS[playerid][0], MYCOOL_COORDS[playerid][1], MYCOOL_COORDS[playerid][2]);
GetPlayerFacingAngle(playerid, MYCOOL_COORDS[playerid][3]);
return 1;
}
public OnPlayerSpawn(playerid) { TogglePlayerSpectating(playerid, false); // Anti F4 Bug - Logging/Registering if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid)) { if(IsPlayerNPC(playerid)) return 1; SetPlayerJoinCamera(playerid); SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); new file[64]; format(file, sizeof(file), "users/%s.ini", RPNU(playerid)); // Player isn't banned if(dini_Int(file, "AdminAccount") == 1) { format(file, sizeof(file), "users/%s.ini",RPNU(playerid)); SetPlayerName(playerid, dini_Get(file, "OldName")); format(file, sizeof(file), "users/%s.ini", RPNU(playerid)); ShowDialog(playerid, 2); } if(!dini_Exists(file)) { ShowDialog(playerid, 1); return 1; } else { ShowDialog(playerid, 2); } return 1; } |
public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerLoggedIn(playerid)) { if(g_bIsRobbiz[playerid]) { DisablePlayerCheckpoint(playerid); DestroyObject(g_robbizBag[playerid]); g_apprehendedCash[playerid] = 0; g_bIsRobbiz[playerid] = false; new copMessage[64]; format(copMessage, sizeof(copMessage), "** %s has been hospitalized and failed the business robbery.", RPN(playerid)); SendCopMessage(COLOR_BLUE, copMessage); } |
error 021: symbol already defined: "OnPlayerSpawn"
error 021: symbol already defined: "FC_OnPlayerDeath"