Why does this stop my OnPlayerDeath callback ? -
Shoko Lacho - 07.03.2011
Hello guys I got a weird problem, really don't know what the fuck is wrong with this..
Why does this stop my OnPlayerDeath callback ?
Код:
if(VigilantePlayer[killerid]==1)
{
if(GetPlayerWeapon(killerid)==25)
{
VigilanteShotgun[killerid]++;
}
if(IsPlayerInAnyVehicle(playerid))
{
if(VigilanteCar[playerid]==1)
{
VigilanteSmash[killerid]++;
}
}
}
I mean, all functions after this aren't called, and this code don't work : /
Same thing with " PlayerData[killerid][Kills]++;" but "PlayerData[playerid][Deaths]++;" is working ...
Re: Why does this stop my OnPlayerDeath callback ? -
Stigg - 07.03.2011
Put that at the end of your callback then.
Should work.
Re : Re: Why does this stop my OnPlayerDeath callback ? -
Shoko Lacho - 07.03.2011
Quote:
Originally Posted by Stigg
Put that at the end of your callback then.
Should work.
|
Nah, already tried.
Re: Why does this stop my OnPlayerDeath callback ? -
Stigg - 07.03.2011
Show the whole callback ?
Re : Re: Why does this stop my OnPlayerDeath callback ? -
Shoko Lacho - 07.03.2011
Quote:
Originally Posted by Stigg
Show the whole callback ?
|
I tried to put this in a white GM, and same thing, don't work + 'stop' the callback, so it's not from the rest of my script.
Re: Why does this stop my OnPlayerDeath callback ? -
Stigg - 07.03.2011
Post the whole OnPlayerDeath callback.
If your just copying it to another gm to test, the prob will still be there.
Re : Re: Why does this stop my OnPlayerDeath callback ? -
Shoko Lacho - 07.03.2011
Quote:
Originally Posted by Stigg
Post the whole OnPlayerDeath callback.
If your just copying it to another gm to test, the prob will still be there.
|
Not in a white GM. I don't think something can help here
Код:
PlayerData[killerid][Kills]++;
PlayerData[playerid][Deaths]++;
GivePlayerMoney(killerid, 500);
if(GetPlayerWeapon(killerid)==16 || GetPlayerWeapon(killerid)==35 || GetPlayerWeapon(killerid)==36 || GetPlayerWeapon(killerid)==39 || GetPlayerWeapon(killerid)==51)
{
PlayerData[killerid][BombSquad]++;
BombSkill[killerid]++;
if(BombSkill[killerid]==25)
{
SendClientMessage(killerid, LIGHTGREEN, ">> "COL_WHITE"BombSquad skill upgraded, you can now defuse claymores "COL_LIGHTORANGE"/defuse");
}
if(BombSkill[killerid]==150)
{
SendClientMessage(killerid, LIGHTGREEN, ">> "COL_WHITE"BombSquad skill upgraded, claymores will not explode anymore as you pass");
}
}
if(VigilantePlayer[playerid]==1)
{
VigilanteDeath[playerid]++;
if(VigilanteDeath[playerid]>=3)
{
VigilantePlayer[playerid]=0;
InMission[playerid]=0;
SendClientMessage(playerid, RED, "<!> "COL_WHITE"Vigilante mission fail, you died 3 times");
}
}
if(VigilantePlayer[killerid]==1)
{
if(GetPlayerWeapon(killerid)==25)
{
VigilanteShotgun[killerid]++;
}
if(IsPlayerInAnyVehicle(playerid))
{
if(VigilanteCar[playerid]==1)
{
VigilanteSmash[killerid]++;
}
}
}
return 1;
}
Re: Why does this stop my OnPlayerDeath callback ? -
Stigg - 07.03.2011
Have you tried
Re : Why does this stop my OnPlayerDeath callback ? -
Shoko Lacho - 07.03.2011
I just tried to add
Код:
if(IsPlayerConnected(killerid))
{
before all times I used "killerid" and it works, anyway dunno why.. but it's good now ^^
Thank's for help.
Re: Re : Why does this stop my OnPlayerDeath callback ? -
Stigg - 07.03.2011
Quote:
Originally Posted by Shoko Lacho
I just tried to add
Код:
if(IsPlayerConnected(killerid))
{
before all times I used "killerid" and it works, anyway dunno why.. but it's good now ^^
Thank's for help.
|
No prob's, you got yourself there in the end