14.08.2018, 21:41
I've created a command when someone enterd the race checkpoint the enemy player must die but When I enterd the race checkpoint I died not the enemy player why?
PHP код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(CompleteKidnap[playerid] == 1)
{
new string[256];
new targetid,tName[MAX_PLAYER_NAME];
GetPlayerName(targetid, tName, sizeof(tName));
SetPlayerHealth(targetid, 0.0);
GivePlayerMoney(playerid, Money[playerid]);
format(string, sizeof(string), "{0BEA00}[Kidnapping]: {FFFFFF}Player {FF9F00}%s(%d) {FFFFFF}has dead by the {E33667}Kidnapping {FFFFFF}by user {FF9F00}%s(%d){FFFFFF}.", tName,targetid, PlayerName(playerid), playerid);
SendClientMessageToAll(-1, string);
format(string, sizeof(string), "{0BEA00}[Money]:{FFFFFF} You have killed {FF9F00}%s(%d) {FFFFFF}by the {E33667}Kidnapping {FFFFFF}and you {E33667}Received{FFFFFF}:{0BEA00}$%d{FFFFFF}.", TargetName(targetid),targetid, Money[playerid]);
SendClientMessage(playerid, -1, string);
CompleteKidnap[playerid] = 0;
DisablePlayerRaceCheckpoint(playerid);
GameTextForPlayer(targetid, "~N~~N~~R~DEAD BY THE ~Y~KIDNAPPING~R~..", 5000 , 5);
GameTextForPlayer(playerid, "~N~~N~~G~COMPLETED~R~..", 5000 , 5);
}
return 1;
}