26.11.2014, 13:59
Right, i'm in the process of making a minigame for my server, which is using OnPlayerDeath.
I've debugged it and found that only "1" & "5" are getting called on the server console.
I've tried everything to fix it, but nothing is working, so I've resorted here.
I've debugged it and found that only "1" & "5" are getting called on the server console.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[128];
SendDeathMessage(killerid, playerid, reason);
print("1");
if(isInLaserShoot{playerid} == true && IsPlayerInAnyVehicle(playerid)) {
print("2");
if(killerid != INVALID_PLAYER_ID) {
print("3");
format(string, sizeof string, "[LASER] You was exploded by, %s!", GetName(killerid));
SendClientMessage(playerid, COLOR_WHITE, string);
pLaserPoints{killerid} += 1;
format(string, sizeof string, "~g~Winning: ~w~%s ( ~b~%dpts ~w~)", GetName(killerid), pLaserPoints{killerid});
TextDrawSetString(Winning, string);
PlayerInfo[killerid][pKills]++;
}
print("4");
format(string, sizeof string, "[LASER] You died unexpectedly!");
SendClientMessage(playerid, COLOR_WHITE, string);
lastVehID{playerid} = GetPlayerVehicleID(playerid);
pLaserPoints{playerid} -= 1;
format(string, sizeof string, "~r~Losing: ~w~%s ( ~b~%dpts ~w~)", GetName(playerid), pLaserPoints{playerid});
TextDrawSetString(Losing, string);
}
print("5");
PlayerInfo[playerid][pDeaths]++;
return 1;
}