SA-MP Forums Archive
rep +++ - 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: rep +++ (/showthread.php?tid=339000)



rep +++ - oscar7610 - 01.05.2012

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    TeamKills[gTeam[killerid]]++;
    GivePlayerMoney(killerid, 500);
    GivePlayerMoney(playerid, -250);
    GameTextForPlayer(killerid, "~r~+500", 500, 1);
    GameTextForPlayer(playerid, "~r~-250", 500, 1);
    SetPlayerScore(playerid, GetPlayerScore( playerid ) -1 );
    SetPlayerScore(killerid, GetPlayerScore( killerid ) +1 );
    SendDeathMessage(killerid, playerid, reason);
    SendClientMessage(playerid,0xFF0000FF, "You have been killed");
    GameTextForPlayer(playerid,"~r~You have been killed!", 3000, 3);
}
Wont show GameTextForPlayer(playerid,"~r~You have been killed!", 3000, 3); when player dies.


Re: rep +++ - DonWade - 01.05.2012

It's becouse u already have GameTextForPlayer(playerid, "~r~-250", 500, 1); that game text showing to player.. Chose one of them or set timer to show other one


Re: rep +++ - mamorunl - 01.05.2012

Or get them into one gametext (merge)


Re: rep +++ - oscar7610 - 01.05.2012

Quote:
Originally Posted by DonWade
Посмотреть сообщение
It's becouse u already have GameTextForPlayer(playerid, "~r~-250", 500, 1); that game text showing to player.. Chose one of them or set timer to show other one
example on mine please? rep you


Re: rep +++ - Kar - 01.05.2012

gametext id 1 is like a god, you cannot show another gametext with a different style while style 1 is executing unless you clear it first


Re: rep +++ - AlTy - 01.05.2012

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    TeamKills[gTeam[killerid]]++;
    GivePlayerMoney(killerid, 500);
    GivePlayerMoney(playerid, -250);
    GameTextForPlayer(killerid, "~r~+500", 500, 1);
    GameTextForPlayer(playerid, "~r~-250~n~You have been killed!", 500, 1);
    SetPlayerScore(playerid, GetPlayerScore( playerid ) -1 );
    SetPlayerScore(killerid, GetPlayerScore( killerid ) +1 );
    SendDeathMessage(killerid, playerid, reason);
    SendClientMessage(playerid,0xFF0000FF, "You have been killed");
}
Fixed version^


Re: rep +++ - Grimrandomer - 02.05.2012

Код:
forward killmessage(playerid);
public killmessage(playerid) {
     GameTextForPlayer(playerid, "~r~You have been killed!", 1000, 1);
}

public OnPlayerDeath(playerid, killerid, reason)
{

    TeamKills[gTeam[killerid]]++;
    GivePlayerMoney(killerid, 500);
    GivePlayerMoney(playerid, -250);
    GameTextForPlayer(killerid, "~r~+500", 500, 1);
    GameTextForPlayer(playerid, "~r~You have been killed!", 500, 1);

    SetTimerEx("killmessage", 600, false, "i", playerid);

    SetPlayerScore(playerid, GetPlayerScore( playerid ) -1 );
    SetPlayerScore(killerid, GetPlayerScore( killerid ) +1 );
    SendDeathMessage(killerid, playerid, reason);
    SendClientMessage(playerid,0xFF0000FF, "You have been killed");
}
And a version with a timer, Why not xD


Re: rep +++ - sniperwars - 02.05.2012

I was on team viewer with him and it has been fixed.