Sa-mp Crash when Die! -
nielsbon1 - 09.06.2009
Hey i got my own server,
And i have a crash bug if i kill som1 or do /kill the sa-mp crash!
can som1 give me please help!
Re: Sa-mp Crash when Die! -
Correlli - 09.06.2009
No one can help you unless you show us your code at OnPlayerDeath which may be causing this crash.
Re: Sa-mp Crash when Die! -
Burridge - 09.06.2009
It can be caused by too many "Unstreamed" Objects, if you have alot of objects, stream them, also lets see your "onplayerdeath".
Re: Sa-mp Crash when Die! -
BP13 - 09.06.2009
its possible you don't have a object streamer and when you die it goes over the 150 or 250 object limit (I forget the limit)
EDIT:This post should be before that one ^ I pressed post 1 second too late. So this relates to the post above
Re: Sa-mp Crash when Die! -
Burridge - 09.06.2009
Quote:
Originally Posted by [SU
BP13 ]
EDIT:This post should be before that one ^ I pressed post 1 second too late. So this relates to the post above
|
I'm just too awesomely quick at typing :P
Re: Sa-mp Crash when Die! -
nielsbon1 - 09.06.2009
So i have to dowload a object streamer have som1 a good link ??
Here is my OnPlayerDeath code:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[256];
if(GetPlayerMoney(playerid) >= 4000)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(1212, 3,X,Y-1,Z);
CreatePickup(1212, 3,X,Y+1,Z);
CreatePickup(1212, 3,X-1,Y,Z);
CreatePickup(1212, 3,X+1,Y,Z);
}
if(OnDelMission[playerid] == 1337)
{
SendClientMessage(playerid,COLOR_ERROR,"Delivery Mission Cancelled. You died!");
OnDelMission[playerid] =0;
}
if(DeliveringCash[playerid] == 1337)
{
SendClientMessage(playerid,COLOR_ERROR,"Delivery Mission Cancelled. You died!");
DeliveringCash[playerid] =0;
}
new msg[128];
new playername[32];
new killername[32];
GetPlayerName(playerid,playername,32);
if ((reason == 255) || (killerid == 255))
{
format(msg, sizeof(msg), "[Death] \2;%s(%i)\2; killed himself.", playername,playerid);
goto snd;
}
else
{
GetPlayerName(killerid,killername,32);
format(msg, sizeof(msg), "[Death] \2;%s(%i)\2; was killed by \2;%s(%i)\2;. (2%s)", playername,playerid, killername,killerid, aWeaponNames[reason]);
}
snd:
printf("msg: %s\n", msg);
ircSay(EchoConnection, EchoChan, msg);
InShamal[playerid] = 0;
TextDrawHideForPlayer(playerid,txtTypeSkill);
SetPlayerVirtualWorld(playerid,0);
GotCopBriberecently[playerid] =0;
OldCash[playerid] =0;
ResetPlayerWeapons(playerid);
PlayerDrugs[playerid] =0;
HasDrugBag[playerid] =0;
HasCried[playerid] =0;
HasC4[playerid] =0;
HasWallet[playerid] =0;
BankRobInsurance[playerid] =0;
Salmonella[playerid] =0;
Chlamydia[playerid] =0;
IsSpawned[playerid] =0;
playerondrugs[playerid] =0;
playertookdrugs[playerid] =0;
HasLawEnforcementRadio[playerid] =0;
LawEnforcementRadio[playerid] =0;
Jailed[playerid] = 0;
JailTime[playerid] =0;
InAlcatraz[playerid] =0;
EscapedConvict[playerid] =0;
cuffed[playerid] =0;
cannotescapejail[playerid] =0;
Wantsfood[playerid] =0;
VisitReq[playerid] =0;
VisitReqExpires[playerid] =0;
wantsheal[playerid] =0;
triedtoescaperecent[playerid] =0;
InBank[playerid] =0;
InDerby[playerid] =0;
Tazed[playerid] =0;
InAdminHQ[playerid] =0;
drunkplayer[playerid] =0;
lastcardrove[playerid] =999;
PlantingC4[playerid] =0;
RobbedCaligs[playerid] =0;
GunDeliveryLevel[playerid] =0;
GunsDeliveryTime[playerid] =0;
DeliveringGuns[playerid] =0;
if(AdminKilled[playerid] == 1 || KilledHimself[playerid] == 1)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,16);
AdminKilled[playerid] =0;
KilledHimself[playerid] =0;
SetPlayerColor(playerid,COLOR_DEADCONNECT);
SetPlayerWantedLevel(playerid,0);
return 1;
}
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
SetPlayerColor(playerid,COLOR_DEADCONNECT);
SetPlayerWantedLevel(playerid,0);
return 1;
}
if(GetDistanceBetweenPlayers(playerid,killerid) > 200)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,53);
SetPlayerWantedLevel(playerid,0);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
return 1;
}
if(InAdminMode[killerid] == 1337)
{
SendDeathMessage(killerid,playerid,reason);
//new killername[24];
new killedname[24];
GetPlayerName(killerid, killername, 24);
GetPlayerName(playerid, killedname, 24);
SetPlayerWantedLevel(playerid,0);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
format(string, sizeof(string),"You have killed %s(%d) while you are in Admin Mode",killedname,playerid);
SendClientMessage(killerid,0xFF7F50AA,string);
format(string, sizeof(string),"Server Admin %s(%d) has killed %s(%d) While in Admin Mode",killername,killerid,killedname,playerid);
printf("%s",string);
ircSay(EchoConnection, EchoChan,string);
return 1;
}
if(gTeam[killerid] == TEAM_HITMAN && HasHitOnHim[playerid] >=1)
{
new victim[30];
new killer[30];
GetPlayerName(playerid,victim, 30);
GetPlayerName(killerid, killer, 30);
new plwl = GetPlayerWantedLevel(killerid);
new pcol = GetPlayerColor(killerid);
SetPlayerWantedLevel(killerid,plwl +10);
plwl = GetPlayerWantedLevel(killerid);
format(string, sizeof(string), "%s(%d) Has been killed by hitman %s(%d) for a hit contract",victim,playerid,killer,killerid);
SendClientMessageToAll(0xB22222AA,string);
SendClientMessage(killerid, 0xA9A9A9AA, "|_Crime Commited_|");
format(string, sizeof(string), "(MURDER) Wanted Level %d",plwl);
SendClientMessage(killerid,pcol,string);
format(string, sizeof(string), "You have killed %s(%d) for a hit contract. You receive a $5000 bonus",victim,playerid);
SendClientMessage(killerid,pcol,string);
GivePlayerMoney(killerid,5000);
SendClientMessage(playerid, 0xA9A9A9AA, "|_Killed For A Hit Contract_|");
format(string, sizeof(string), "Hitman %s(%d) Has killed you for a Hit Contract. Be careful who you make enemys in the future",killer,killerid);
SendClientMessage(playerid,0x00C7FFAA,string);
HasHitOnHim[playerid] =0;
commitedcrimerecently[killerid] +=360;
SendDeathMessage(killerid,playerid,reason);
SetPlayerWantedLevel(playerid,0);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore +1);
for(new i=0;i<MAX_PLAYERS;i++)
{
new current_zone;
current_zone = player_zone[killerid];
if(LawEnforcementRadio[i] == 1) {
format(string, sizeof(string), "DISPATCH: (CONTRACTED MURDER) %s(%d) Has murdered %s(%d) Location: %s",killer,killerid,victim,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_ROYALBLUE, string);
}
}
return 1;
}
if(Jailed[killerid] == 1) {
SendDeathMessage(killerid,playerid,reason);
}
if(gTeam[killerid] >=3 && Jailed[killerid] == 0) {
new victim[24];
new killer[24];
GetPlayerName(playerid,victim, 24);
GetPlayerName(killerid, killer, 24);
new plwl = GetPlayerWantedLevel(killerid);
new pcol = GetPlayerColor(killerid);
SetPlayerWantedLevel(killerid,plwl +10);
plwl = GetPlayerWantedLevel(killerid);
SendClientMessage(killerid, 0xA9A9A9AA, "|_Crime Commited_|");
format(string, sizeof(string), "(MURDER) Wanted Level %d",plwl);
SendClientMessage(killerid,pcol,string);
commitedcrimerecently[killerid] +=360;
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
for(new i=0;i<MAX_PLAYERS;i++)
{
new current_zone;
current_zone = player_zone[killerid];
if(LawEnforcementRadio[i] == 1) {
format(string, sizeof(string), "DISPATCH: (MURDER) %s(%d) Has murdered %s(%d) Location: %s",killer,killerid,victim,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_ROYALBLUE, string);
}
}
return 1;
}
if(gTeam[killerid] <=2 && gTeam[playerid] <=2 && IsSpawned[killerid] == 1 && Jailed[killerid] == 0) {
teamkiller[killerid] +=1;
if(teamkiller[killerid] >=3) {
new str[100];
GetPlayerName(killerid, str, 24);
format(str, 100, "**(AUTO KICK)** %s(%d) Too Many Team Kills (TeamKiller)", str,killerid);
SendClientMessageToAll(0xFF7F50AA, str);
ircSay(EchoConnection, EchoChan, str);
printf("%s", str);
SetPlayerInterior(killerid,10);
SetPlayerPos(killerid,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(killerid,2.2339);
SetCameraBehindPlayer(killerid);
teamkiller[killerid] =0;
Kicking[killerid] =1;
SetTimer("KickPlayer",700,0);
return 1;
}
SendClientMessage(killerid,COLOR_RED, "TEAM KILL - Do not kill other Law Enforcement agents (Blue/Purple)");
SendClientMessage(killerid,COLOR_RED, "If you continue to kill other Law Enforcement agents you will be kicked/banned");
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore -1);
return 1;
}
if(gTeam[killerid] <=2 && gTeam[playerid] >= 3 && IsSpawned[killerid] == 1 && Jailed[killerid] == 0)
{
new plwl = GetPlayerWantedLevel(playerid);
if(plwl == 0) {
innocentkiller[killerid] +=1;
if(innocentkiller[killerid] >=3) {
new str[100];
GetPlayerName(killerid, str, 24);
format(str, 100, "**(AUTO KICK)** %s(%d) Too Many Innocent Kills", str,killerid);
SendClientMessageToAll(0xFF7F50AA, str);
ircSay(EchoConnection, EchoChan, str);
printf("%s", str);
SetPlayerInterior(killerid,10);
SetPlayerPos(killerid,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(killerid,2.2339);
SetCameraBehindPlayer(killerid);
innocentkiller[killerid] =0;
Kicking[killerid] =1;
SetTimer("KickPlayer",700,0);
return 1;
}
SendClientMessage(killerid,COLOR_RED, "INNOCENT KILL - Do not kill innocent civilians (White)");
SendClientMessage(killerid,COLOR_RED, "If you continue to kill innocent players you will be kicked/banned");
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore -1);
}
else
if(plwl >=1 && plwl <=3) {
lowwantedkiller[killerid] +=1;
if(lowwantedkiller[killerid] >=3) {
new str[100];
GetPlayerName(killerid, str, 24);
format(str, 100, "**(AUTO KICK)** %s(%d) Too Many Low Wanted Kills", str,killerid);
SendClientMessageToAll(0xFF7F50AA, str);
ircSay(EchoConnection, EchoChan, str);
printf("%s", str);
SetPlayerInterior(killerid,10);
SetPlayerPos(killerid,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(killerid,2.2339);
SetCameraBehindPlayer(killerid);
lowwantedkiller[killerid] =0;
Kicking[killerid] =1;
SetTimer("KickPlayer",700,0);
return 1;
}
SendClientMessage(killerid,COLOR_RED, "LOW WANTED KILL - Do not kill low wanted players (Yellow)");
SendClientMessage(killerid,COLOR_RED, "Use /fine (id) to issue a fine to low wanted suspects (Yellow)");
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore -1);
}
else
if(plwl >=4 && plwl <=9) {
new killer[24];
new victim[24];
GetPlayerName(playerid,victim,24);
GetPlayerName(killerid, killer, 24);
format(string, sizeof(string), "Officer %s(%d) has taken suspect %s(%d) down using deadly force",killer,killerid,victim,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
ircSay(EchoConnection, EchoChan, string);
printf("%s", string);
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
}
else
if(plwl >=10) {
new killer[24];
new victim[24];
GetPlayerName(playerid,victim,24);
GetPlayerName(killerid, killer, 24);
format(string, sizeof(string), "Officer %s(%d) has taken Most Wanted suspect %s(%d) down using deadly force",killer,killerid,victim,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
ircSay(EchoConnection, EchoChan, string);
printf("%s", string);
if(gTeam[killerid] == TEAM_ARMY) {
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore +1);
SendClientMessage(killerid,0xA9A9A9AA, "|_Suspect Take Down_|");
format(string, sizeof(string), "You have taken Most Wanted suspect %s(%d) down. You receive a $3500 bonus",victim,playerid);
SendClientMessage(killerid,0x00C7FFAA, string);
GivePlayerMoney(killerid,3500);
}
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
}
}
HasHitOnHim[playerid] =0;
SetPlayerWantedLevel(playerid,0);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
tCount[vehicleid] = false;
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
if (GetVehicleModel(vehicleid) == shamal && ShamalExists(vehicleid))
{
CreateExplosion(ShamalPos[vehicleid][0], ShamalPos[vehicleid][1], ShamalPos[vehicleid][2], 2, 15.0);
sExplode[vehicleid] = SetTimerEx("ExplodeShamal", 700, 1, "d", vehicleid);
tCount[vehicleid] = true;
}
if(BoughtCars[vehicleid] == 999)
{
DestroyVehicle(vehicleid);
}
SandInEngine[vehicleid] =0;
return 1;
}
Re: Sa-mp Crash when Die! -
BP13 - 09.06.2009
Search Object Streamer
Re: Sa-mp Crash when Die! -
Burridge - 09.06.2009
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[256];
if(GetPlayerMoney(playerid) >= 4000)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(1212, 3,X,Y-1,Z);
CreatePickup(1212, 3,X,Y+1,Z);
CreatePickup(1212, 3,X-1,Y,Z);
CreatePickup(1212, 3,X+1,Y,Z);
}
if(OnDelMission[playerid] == 1337)
{
SendClientMessage(playerid,COLOR_ERROR,"Delivery Mission Cancelled. You died!");
OnDelMission[playerid] =0;
}
if(DeliveringCash[playerid] == 1337)
{
SendClientMessage(playerid,COLOR_ERROR,"Delivery Mission Cancelled. You died!");
DeliveringCash[playerid] =0;
}
new msg[128];
new playername[32];
new killername[32];
GetPlayerName(playerid,playername,32);
if ((reason == 255) || (killerid == 255))
{
format(msg, sizeof(msg), "[Death] \2;%s(%i)\2; killed himself.", playername,playerid);
goto snd;
}
else
{
GetPlayerName(killerid,killername,32);
format(msg, sizeof(msg), "[Death] \2;%s(%i)\2; was killed by \2;%s(%i)\2;. (2%s)", playername,playerid, killername,killerid, aWeaponNames[reason]);
}
snd:
printf("msg: %s\n", msg);
ircSay(EchoConnection, EchoChan, msg);
InShamal[playerid] = 0;
TextDrawHideForPlayer(playerid,txtTypeSkill);
SetPlayerVirtualWorld(playerid,0);
GotCopBriberecently[playerid] =0;
OldCash[playerid] =0;
ResetPlayerWeapons(playerid);
PlayerDrugs[playerid] =0;
HasDrugBag[playerid] =0;
HasCried[playerid] =0;
HasC4[playerid] =0;
HasWallet[playerid] =0;
BankRobInsurance[playerid] =0;
Salmonella[playerid] =0;
Chlamydia[playerid] =0;
IsSpawned[playerid] =0;
playerondrugs[playerid] =0;
playertookdrugs[playerid] =0;
HasLawEnforcementRadio[playerid] =0;
LawEnforcementRadio[playerid] =0;
Jailed[playerid] = 0;
JailTime[playerid] =0;
InAlcatraz[playerid] =0;
EscapedConvict[playerid] =0;
cuffed[playerid] =0;
cannotescapejail[playerid] =0;
Wantsfood[playerid] =0;
VisitReq[playerid] =0;
VisitReqExpires[playerid] =0;
wantsheal[playerid] =0;
triedtoescaperecent[playerid] =0;
InBank[playerid] =0;
InDerby[playerid] =0;
Tazed[playerid] =0;
InAdminHQ[playerid] =0;
drunkplayer[playerid] =0;
lastcardrove[playerid] =999;
PlantingC4[playerid] =0;
RobbedCaligs[playerid] =0;
GunDeliveryLevel[playerid] =0;
GunsDeliveryTime[playerid] =0;
DeliveringGuns[playerid] =0;
if(AdminKilled[playerid] == 1 || KilledHimself[playerid] == 1)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,16);
AdminKilled[playerid] =0;
KilledHimself[playerid] =0;
SetPlayerColor(playerid,COLOR_DEADCONNECT);
SetPlayerWantedLevel(playerid,0);
return 1;
}
if(killerid == INVALID_PLAYER_ID)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
SetPlayerWantedLevel(playerid,0);
return 1;
}
if(GetDistanceBetweenPlayers(playerid,killerid) > 200)
{
SendDeathMessage(INVALID_PLAYER_ID,playerid,53);
SetPlayerWantedLevel(playerid,0);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
return 1;
}
if(InAdminMode[killerid] == 1337)
{
SendDeathMessage(killerid,playerid,reason);
//new killername[24];
new killedname[24];
GetPlayerName(killerid, killername, 24);
GetPlayerName(playerid, killedname, 24);
SetPlayerWantedLevel(playerid,0);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
format(string, sizeof(string),"You have killed %s(%d) while you are in Admin Mode",killedname,playerid);
SendClientMessage(killerid,0xFF7F50AA,string);
format(string, sizeof(string),"Server Admin %s(%d) has killed %s(%d) While in Admin Mode",killername,killerid,killedname,playerid);
printf("%s",string);
ircSay(EchoConnection, EchoChan,string);
return 1;
}
if(gTeam[killerid] == TEAM_HITMAN && HasHitOnHim[playerid] >=1)
{
new victim[30];
new killer[30];
GetPlayerName(playerid,victim, 30);
GetPlayerName(killerid, killer, 30);
new plwl = GetPlayerWantedLevel(killerid);
new pcol = GetPlayerColor(killerid);
SetPlayerWantedLevel(killerid,plwl +10);
plwl = GetPlayerWantedLevel(killerid);
format(string, sizeof(string), "%s(%d) Has been killed by hitman %s(%d) for a hit contract",victim,playerid,killer,killerid);
SendClientMessageToAll(0xB22222AA,string);
SendClientMessage(killerid, 0xA9A9A9AA, "|_Crime Commited_|");
format(string, sizeof(string), "(MURDER) Wanted Level %d",plwl);
SendClientMessage(killerid,pcol,string);
format(string, sizeof(string), "You have killed %s(%d) for a hit contract. You receive a $5000 bonus",victim,playerid);
SendClientMessage(killerid,pcol,string);
GivePlayerMoney(killerid,5000);
SendClientMessage(playerid, 0xA9A9A9AA, "|_Killed For A Hit Contract_|");
format(string, sizeof(string), "Hitman %s(%d) Has killed you for a Hit Contract. Be careful who you make enemys in the future",killer,killerid);
SendClientMessage(playerid,0x00C7FFAA,string);
HasHitOnHim[playerid] =0;
commitedcrimerecently[killerid] +=360;
SendDeathMessage(killerid,playerid,reason);
SetPlayerWantedLevel(playerid,0);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore +1);
for(new i=0;i<MAX_PLAYERS;i++)
{
new current_zone;
current_zone = player_zone[killerid];
if(LawEnforcementRadio[i] == 1) {
format(string, sizeof(string), "DISPATCH: (CONTRACTED MURDER) %s(%d) Has murdered %s(%d) Location: %s",killer,killerid,victim,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_ROYALBLUE, string);
}
}
return 1;
}
if(Jailed[killerid] == 1) {
SendDeathMessage(killerid,playerid,reason);
}
if(gTeam[killerid] >=3 && Jailed[killerid] == 0) {
new victim[24];
new killer[24];
GetPlayerName(playerid,victim, 24);
GetPlayerName(killerid, killer, 24);
new plwl = GetPlayerWantedLevel(killerid);
new pcol = GetPlayerColor(killerid);
SetPlayerWantedLevel(killerid,plwl +10);
plwl = GetPlayerWantedLevel(killerid);
SendClientMessage(killerid, 0xA9A9A9AA, "|_Crime Commited_|");
format(string, sizeof(string), "(MURDER) Wanted Level %d",plwl);
SendClientMessage(killerid,pcol,string);
commitedcrimerecently[killerid] +=360;
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
for(new i=0;i<MAX_PLAYERS;i++)
{
new current_zone;
current_zone = player_zone[killerid];
if(LawEnforcementRadio[i] == 1) {
format(string, sizeof(string), "DISPATCH: (MURDER) %s(%d) Has murdered %s(%d) Location: %s",killer,killerid,victim,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_ROYALBLUE, string);
}
}
return 1;
}
if(gTeam[killerid] <=2 && gTeam[playerid] <=2 && IsSpawned[killerid] == 1 && Jailed[killerid] == 0) {
teamkiller[killerid] +=1;
if(teamkiller[killerid] >=3) {
new str[100];
GetPlayerName(killerid, str, 24);
format(str, 100, "**(AUTO KICK)** %s(%d) Too Many Team Kills (TeamKiller)", str,killerid);
SendClientMessageToAll(0xFF7F50AA, str);
ircSay(EchoConnection, EchoChan, str);
printf("%s", str);
SetPlayerInterior(killerid,10);
SetPlayerPos(killerid,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(killerid,2.2339);
SetCameraBehindPlayer(killerid);
teamkiller[killerid] =0;
Kicking[killerid] =1;
SetTimer("KickPlayer",700,0);
return 1;
}
SendClientMessage(killerid,COLOR_RED, "TEAM KILL - Do not kill other Law Enforcement agents (Blue/Purple)");
SendClientMessage(killerid,COLOR_RED, "If you continue to kill other Law Enforcement agents you will be kicked/banned");
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore -1);
return 1;
}
if(gTeam[killerid] <=2 && gTeam[playerid] >= 3 && IsSpawned[killerid] == 1 && Jailed[killerid] == 0)
{
new plwl = GetPlayerWantedLevel(playerid);
if(plwl == 0) {
innocentkiller[killerid] +=1;
if(innocentkiller[killerid] >=3) {
new str[100];
GetPlayerName(killerid, str, 24);
format(str, 100, "**(AUTO KICK)** %s(%d) Too Many Innocent Kills", str,killerid);
SendClientMessageToAll(0xFF7F50AA, str);
ircSay(EchoConnection, EchoChan, str);
printf("%s", str);
SetPlayerInterior(killerid,10);
SetPlayerPos(killerid,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(killerid,2.2339);
SetCameraBehindPlayer(killerid);
innocentkiller[killerid] =0;
Kicking[killerid] =1;
SetTimer("KickPlayer",700,0);
return 1;
}
SendClientMessage(killerid,COLOR_RED, "INNOCENT KILL - Do not kill innocent civilians (White)");
SendClientMessage(killerid,COLOR_RED, "If you continue to kill innocent players you will be kicked/banned");
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore -1);
}
else
if(plwl >=1 && plwl <=3) {
lowwantedkiller[killerid] +=1;
if(lowwantedkiller[killerid] >=3) {
new str[100];
GetPlayerName(killerid, str, 24);
format(str, 100, "**(AUTO KICK)** %s(%d) Too Many Low Wanted Kills", str,killerid);
SendClientMessageToAll(0xFF7F50AA, str);
ircSay(EchoConnection, EchoChan, str);
printf("%s", str);
SetPlayerInterior(killerid,10);
SetPlayerPos(killerid,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(killerid,2.2339);
SetCameraBehindPlayer(killerid);
lowwantedkiller[killerid] =0;
Kicking[killerid] =1;
SetTimer("KickPlayer",700,0);
return 1;
}
SendClientMessage(killerid,COLOR_RED, "LOW WANTED KILL - Do not kill low wanted players (Yellow)");
SendClientMessage(killerid,COLOR_RED, "Use /fine (id) to issue a fine to low wanted suspects (Yellow)");
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore -1);
}
else
if(plwl >=4 && plwl <=9) {
new killer[24];
new victim[24];
GetPlayerName(playerid,victim,24);
GetPlayerName(killerid, killer, 24);
format(string, sizeof(string), "Officer %s(%d) has taken suspect %s(%d) down using deadly force",killer,killerid,victim,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
ircSay(EchoConnection, EchoChan, string);
printf("%s", string);
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
}
else
if(plwl >=10) {
new killer[24];
new victim[24];
GetPlayerName(playerid,victim,24);
GetPlayerName(killerid, killer, 24);
format(string, sizeof(string), "Officer %s(%d) has taken Most Wanted suspect %s(%d) down using deadly force",killer,killerid,victim,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
ircSay(EchoConnection, EchoChan, string);
printf("%s", string);
if(gTeam[killerid] == TEAM_ARMY) {
oscore = GetPlayerScore(killerid);
SetPlayerScore(killerid, oscore +1);
SendClientMessage(killerid,0xA9A9A9AA, "|_Suspect Take Down_|");
format(string, sizeof(string), "You have taken Most Wanted suspect %s(%d) down. You receive a $3500 bonus",victim,playerid);
SendClientMessage(killerid,0x00C7FFAA, string);
GivePlayerMoney(killerid,3500);
}
SendDeathMessage(killerid,playerid,reason);
SetPlayerColor(playerid,COLOR_DEADCONNECT);
}
}
HasHitOnHim[playerid] =0;
SetPlayerWantedLevel(playerid,0);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
tCount[vehicleid] = false;
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
if (GetVehicleModel(vehicleid) == shamal && ShamalExists(vehicleid))
{
CreateExplosion(ShamalPos[vehicleid][0], ShamalPos[vehicleid][1], ShamalPos[vehicleid][2], 2, 15.0);
sExplode[vehicleid] = SetTimerEx("ExplodeShamal", 700, 1, "d", vehicleid);
tCount[vehicleid] = true;
}
if(BoughtCars[vehicleid] == 999)
{
DestroyVehicle(vehicleid);
}
SandInEngine[vehicleid] =0;
return 1;
}
Putting it in the code tags makes life easyer, and easyer too see :P
I must say, that's a mighty big death code ^^
Re: Sa-mp Crash when Die! -
nielsbon1 - 09.06.2009
I have installed MildoStream and still is the problem there
Re: Sa-mp Crash when Die! -
nielsbon1 - 09.06.2009
The bug is not on my gamemode so it's have to bee with the object howmay object stand in my game how can i see that?