It In Not Working Help Please - 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)
+--- Thread: It In Not Working Help Please (
/showthread.php?tid=299087)
It In Not Working Help Please -
Danyal - 24.11.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if ((SDZDM [playerid] == 1) && (SDZDM1 [playerid] == 1) && (SDZDM2 [playerid] == 1))
{
GivePlayerMoney(killerid, 1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
}
if ((SDZDM [playerid] == 0) && (SDZDM1 [playerid] == 0) && (SDZDM2 [playerid] == 0))
{
SetPlayerScore(killerid,GetPlayerScore(killerid)-1000);
SendClientMessage(killerid, -1,""Yellow"Defender[SDZ]: "White"Dont Kill People Out Of DeathMatching Areas! You Are Fined "Green"$5000 "White"and "Green"1000 Drift Points"White"!");
GivePlayerMoney(killerid, -5000);
}
return 1;
}
i have made above on player death call back but problem is that i dont want people to dm outside dm zones so i made above script but problem is that its not working becoz of some reasons please help me. sorry for my bad english
Re: It In Not Working Help Please -
CSSI - 24.11.2011

use killerid Not playerid, playerid is the one who died.
pawn Код:
if ((SDZDM [killerid] == 1) && (SDZDM1 [killerid] == 1) && (SDZDM2 [killerid] == 1))
if ((SDZDM [killerid] == 0) && (SDZDM1 [killerid] == 0) && (SDZDM2 [killerid] == 0))
Re: It In Not Working Help Please -
Danyal - 24.11.2011
lol did got that idea btw thanks i alot +rep