28.06.2014, 09:03
How do i do it? O_O
can someone help me?
can someone help me?
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid != INVALID_PLAYER_ID & killerid != INVALID_PLAYER_ID & playerid != killerid) { GivePlayerMoney(killerid, 1000); }
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); new str[128]; PlayerAcc[killerid][Kills]++; PlayerAcc[playerid][Deaths]++; StopAudioStreamForPlayer(playerid); if(IsBeingSpeced[playerid] == 1) { foreach(Player, i) { if(spectatorid[i] == playerid) { KillTimer(SpecTimer[i]); StopSpectate(i); format(str, sizeof(str), "Your spectating to %s(%d) has been ended (Reason: Player Death)", GetName(playerid), playerid); SendClientMessage(i, COLOR_RED, str); } } } if(gPlayerUsingLoopingAnim[playerid]) { gPlayerUsingLoopingAnim[playerid] = 0; TextDrawHideForPlayer(playerid, txtAnimHelper); } if(PlayerAcc[playerid][pDuty] == 1) { GameTextForPlayer(playerid, "~w~Admin Duty ~r~Ended!", 4000, 3); SendClientMessage(playerid, COLOR_RED, "Your Admin Duty has been ended, You die!"); PlayerAcc[playerid][pDuty] = 0; KillTimer(HealthTimer[playerid]); SetPlayerColor(playerid, GetPVarInt(playerid, "MyColor")); Delete3DTextLabel(Duty[playerid]); } if(PlayerAcc[playerid][God] == 1) { GameTextForPlayer(playerid, "~w~God Mode ~r~Ended!", 4000, 3); SendClientMessage(playerid, COLOR_RED, "Your God Mode has been ended, You die!"); PlayerAcc[playerid][God] = 0; KillTimer(HealthTimer[playerid]); Delete3DTextLabel(GodM[playerid]); } if(GetPlayerMoney(playerid) >= 1) { GivePlayerMoney(playerid, -1); } else return SendClientMessage(playerid, COLOR_RED, "The Server didn't take your score, Because you don't have score"); return 1; }
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerid != INVALID_PLAYER_ID & killerid != INVALID_PLAYER_ID & playerid != killerid) { GivePlayerMoney(killerid, 1000); }
SendDeathMessage(killerid, playerid, reason);
new str[128];
PlayerAcc[killerid][Kills]++;
PlayerAcc[playerid][Deaths]++;
StopAudioStreamForPlayer(playerid);
if(IsBeingSpeced[playerid] == 1)
{
foreach(Player, i)
{
if(spectatorid[i] == playerid)
{
KillTimer(SpecTimer[i]);
StopSpectate(i);
format(str, sizeof(str), "Your spectating to %s(%d) has been ended (Reason: Player Death)", GetName(playerid), playerid);
SendClientMessage(i, COLOR_RED, str);
}
}
}
if(gPlayerUsingLoopingAnim[playerid])
{
gPlayerUsingLoopingAnim[playerid] = 0;
TextDrawHideForPlayer(playerid, txtAnimHelper);
}
if(PlayerAcc[playerid][pDuty] == 1)
{
GameTextForPlayer(playerid, "~w~Admin Duty ~r~Ended!", 4000, 3);
SendClientMessage(playerid, COLOR_RED, "Your Admin Duty has been ended, You die!");
PlayerAcc[playerid][pDuty] = 0;
KillTimer(HealthTimer[playerid]);
SetPlayerColor(playerid, GetPVarInt(playerid, "MyColor"));
Delete3DTextLabel(Duty[playerid]);
}
if(PlayerAcc[playerid][God] == 1)
{
GameTextForPlayer(playerid, "~w~God Mode ~r~Ended!", 4000, 3);
SendClientMessage(playerid, COLOR_RED, "Your God Mode has been ended, You die!");
PlayerAcc[playerid][God] = 0;
KillTimer(HealthTimer[playerid]);
Delete3DTextLabel(GodM[playerid]);
}
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerMoney(playerid, -1);
}
else return SendClientMessage(playerid, COLOR_RED, "The Server didn't take your score, Because you don't have score");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); new str[128]; PlayerAcc[killerid][Kills]++; PlayerAcc[playerid][Deaths]++; StopAudioStreamForPlayer(playerid); if(killerid != INVALID_PLAYER_ID) { GivePlayerMoney(killerid,1000); } if(IsBeingSpeced[playerid] == 1) { foreach(Player, i) { if(spectatorid[i] == playerid) { KillTimer(SpecTimer[i]); StopSpectate(i); format(str, sizeof(str), "Your spectating to %s(%d) has been ended (Reason: Player Death)", GetName(playerid), playerid); SendClientMessage(i, COLOR_RED, str); } } } if(gPlayerUsingLoopingAnim[playerid]) { gPlayerUsingLoopingAnim[playerid] = 0; TextDrawHideForPlayer(playerid, txtAnimHelper); } if(PlayerAcc[playerid][pDuty] == 1) { GameTextForPlayer(playerid, "~w~Admin Duty ~r~Ended!", 4000, 3); SendClientMessage(playerid, COLOR_RED, "Your Admin Duty has been ended, You die!"); PlayerAcc[playerid][pDuty] = 0; KillTimer(HealthTimer[playerid]); SetPlayerColor(playerid, GetPVarInt(playerid, "MyColor")); Delete3DTextLabel(Duty[playerid]); } if(PlayerAcc[playerid][God] == 1) { GameTextForPlayer(playerid, "~w~God Mode ~r~Ended!", 4000, 3); SendClientMessage(playerid, COLOR_RED, "Your God Mode has been ended, You die!"); PlayerAcc[playerid][God] = 0; KillTimer(HealthTimer[playerid]); Delete3DTextLabel(GodM[playerid]); } if(GetPlayerMoney(playerid) >= 1) { GivePlayerMoney(playerid, -1); } else return SendClientMessage(playerid, COLOR_RED, "The Server didn't take your score, Because you don't have score"); return 1; }
:l at the top of onplayerdeath?
pawn Код:
|
Код:
public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); new str[128]; PlayerAcc[killerid][Kills]++; PlayerAcc[playerid][Deaths]++; StopAudioStreamForPlayer(playerid); if(killerid != INVALID_PLAYER_ID) { GivePlayerMoney(killerid,1000); } if(IsBeingSpeced[playerid] == 1) { foreach(Player, i) { if(spectatorid[i] == playerid) { KillTimer(SpecTimer[i]); StopSpectate(i); format(str, sizeof(str), "Your spectating to %s(%d) has been ended (Reason: Player Death)", GetName(playerid), playerid); SendClientMessage(i, COLOR_RED, str); } } } if(gPlayerUsingLoopingAnim[playerid]) { gPlayerUsingLoopingAnim[playerid] = 0; TextDrawHideForPlayer(playerid, txtAnimHelper); } if(PlayerAcc[playerid][pDuty] == 1) { GameTextForPlayer(playerid, "~w~Admin Duty ~r~Ended!", 4000, 3); SendClientMessage(playerid, COLOR_RED, "Your Admin Duty has been ended, You die!"); PlayerAcc[playerid][pDuty] = 0; KillTimer(HealthTimer[playerid]); SetPlayerColor(playerid, GetPVarInt(playerid, "MyColor")); Delete3DTextLabel(Duty[playerid]); } if(PlayerAcc[playerid][God] == 1) { GameTextForPlayer(playerid, "~w~God Mode ~r~Ended!", 4000, 3); SendClientMessage(playerid, COLOR_RED, "Your God Mode has been ended, You die!"); PlayerAcc[playerid][God] = 0; KillTimer(HealthTimer[playerid]); Delete3DTextLabel(GodM[playerid]); } if(GetPlayerMoney(playerid) >= 1) { GivePlayerMoney(playerid, -1); } else return SendClientMessage(playerid, COLOR_RED, "The Server didn't take your score, Because you don't have score"); return 1; } |