id 0 spawns at blueberry -
reddoxx - 07.08.2018
if the player has id 0, he spawns at blueberry
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new str[128];
if(Character[playerid][Jail] > 0)
{
format(str, sizeof(str), "[INFO] Mйg mindig bцrtцnben vagy. Mйg %d percet kell letцltened.", Character[playerid][Jail]);
SendClientMessage(playerid, COLOR_INDIANRED, str);
return SendToJail(playerid);
}
GetPlayerPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
deadWorld[playerid] = GetPlayerVirtualWorld(playerid);
deadInterior[playerid] = GetPlayerInterior(playerid);
Character[playerid][Dead] = 1;
//SetTimerEx("Death", SECONDS(1), 0, "i", playerid);
format(str, sizeof(str),"%s sъlyosan megsebesнtve %s бltal.",GetRoleplayName(playerid),GetRoleplayName(killerid));
SendAdminsMessage(1, COLOR_RED, str);
/*Character[playerid][InHospital] = 1;
GetPlayerPos(playerid, Character[playerid][PosX], Character[playerid][PosY], Character[playerid][PosZ]);
if(LoopAnim[playerid])
{
LoopAnim[playerid] = 0;
TextDrawHideForPlayer(playerid,AnimText[playerid]);
}
TextDrawShowForPlayer(playerid, BlackScreen[playerid]);
TextDrawShowForPlayer(playerid, BlackOutText[playerid]);
format(str, sizeof(str), "* %s a fцldre esik eszmйletlenьl. *", GetRoleplayName(playerid));
SendLocalMessage(playerid, str, Range_Normal, COLOR_RP, COLOR_RP);
ClearPlayerWeapons(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerControllable(playerid, false);
if(killerid != INVALID_PLAYER_ID)
{
format(str, sizeof(str),"%s sъlyosan megsebesнtve %s бltal.",GetRoleplayName(playerid),GetRoleplayName(killerid));
SendAdminsMessage(1, COLOR_RED, str);
}
else
{
format(str, sizeof(str),"%s sъlyosan megsйrьlt.",GetRoleplayName(playerid));
SendAdminsMessage(1, COLOR_ORANGERED, str);
}
SetTimerEx("Hospital", SECONDS(10), 0, "i", playerid);*/
return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
if(!LibsPreloaded[playerid]) {
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"SWEET");
PreloadAnimLib(playerid,"RIOT");
PreloadAnimLib(playerid,"PED");
PreloadAnimLib(playerid,"POLICE");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
LibsPreloaded[playerid] = 1;
}
// SetPlayerTeam(playe
if(Character[playerid][Dead] == 1)
{
SetPlayerPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
SetPlayerVirtualWorld(playerid, deadWorld[playerid]);
SetPlayerInterior(playerid, deadInterior[playerid]);
new string[128];
GameTextForPlayer(playerid, "~b~SЪLYOSAN MEGSЙRЬLTЙL", 5000, 3);
Character[playerid][OnAnim] = 1;
RemovePlayerFromVehicle(playerid);
ClearAnimations(playerid);
Character[playerid][RespawnTime1] = gettime();
//ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.1, 0, 1, 1, 1, 0, 1);
SetTimerEx("WUZIANIM", 3000, false, "d", playerid);
//ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.1, 0, 1, 1, 1, 0, 1);
SetPlayerHealth(playerid, 250);
SendClientMessage(playerid, COLOR_LIGHTRED, "Sъlyosan megsйrьltйl, amennyiben valaki nem segнt rajtad, meghalsz.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Halбlod elfogadбsбhoz hasznбld a /acceptdeath parancsot.");
format(string, sizeof(string), "(( Megsebesьlve %d alkalommal, /damages %d tovбbbi informбciуйrt. ))", Character[playerid][Shotted], playerid);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1000);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1000);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
UpdatePlayerWeapons(playerid);
}
// ...
return 1;
}
Re: id 0 spawns at blueberry -
reddoxx - 08.08.2018
bump
Re: id 0 spawns at blueberry -
reddoxx - 08.08.2018
solved, this shit fucked the server in my unfreeze command...
Код:
Character[pID][Dead] = 0;