death bug plz help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: death bug plz help (
/showthread.php?tid=220243)
death bug plz help -
hadzx - 03.02.2011
ok so what happens is when you kill somebody not in a dm works fine you killed a player and gain 75k but when you go into a deathmatch on the right it sends the deathmsg twice and it says
You Have Killed A Player And Gained 75K
you killed somebody in mac
and its for all dms cant fix it you can pm me for the ip and il show u thanks heres the onplayerdeath code
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(dildo[playerid] == 1)
{
SendDeathMessage(killerid, playerid, reason);
SendClientMessage(killerid, 0xFF0000FF, "You killed somebody in dildo ");
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s {F3FF02}Has Died In {FF00EA}Dildo {00C0FF}Deathmatch{F81414}!",name);
SendClientMessageToAll(0xFFFF00AA, string);
dildo[playerid] = 0;
}
if(minig[playerid] == 1)
{
SendDeathMessage(killerid, playerid, reason);
SendClientMessage(killerid, 0xFF0000FF, "You killed somebody in minigun");
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s {F3FF02}Has Died In {FF00EA}Minigun {00C0FF}Deathmatch{F81414}!",name);
SendClientMessageToAll(0xFFFF00AA, string);
minig[playerid] = 1;
}
if(macdm[playerid] == 1)
{
SendDeathMessage(killerid, playerid, reason);
SendClientMessage(killerid, 0xFF0000FF, "you killed somebody in mac");
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s {F3FF02}Has Died In {FF00EA}Mac {00C0FF}Deathmatch{F81414}!",name);
SendClientMessageToAll(0xFFFF00AA, string);
macdm[playerid] = 1;
}
else
{
SendDeathMessage(killerid, playerid, reason);
SendClientMessage(killerid, 0xFF0000FF, "You Have Killed A Player And Gained 75K");
GivePlayerMoney(killerid,75000);
}
return 1;
}
it compiles fine tho thankyou!!
Remember if i dint explane it good pm me and il give u ip and u can see 4 ya self ty
AW: death bug plz help -
Nero_3D - 03.02.2011
just use else if after the first if
Re: AW: death bug plz help -
hadzx - 03.02.2011
Quote:
Originally Posted by Nero_3D
just use else if after the first if
|
tryed that gets MADLY Bugged dont worry i made a spawn[playerid = 0; and stuff and got it working thanks 4 the reply