rep +++
#1

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.
Reply
#2

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
Reply
#3

Or get them into one gametext (merge)
Reply
#4

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
Reply
#5

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
Reply
#6

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^
Reply
#7

Код:
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
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)