Add this in a text or something
#1

Hello, for exemple if I have :

Код:
OnPlayerDeath -

Kills[killerid]++;
How to use the number of kills in a text like SendClientMessage or ShowPlayerDialog ?
Reply
#2

format is what you are looking for

https://sampwiki.blast.hk/wiki/Format
Reply
#3

Try this, worked for a user earlier.

pawn Код:
new KillingSpree[MAX_PLAYERS]//at top

Then under OnPlayerDeath(playerid, killerid, reason)...

pawn Код:
KillingSpree[killerid] ++;
    KillingSpree[playerid] = 0;
    if(KillingSpree[killerid] == 5)
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(killerid,name,sizeof(name));
        new streaktxt[128];
        format(streaktxt,sizeof(streaktxt),"~b~NEWS FLASH:~w~ %s is on a Killing Spree. Kills: %d",name,KillingSpree[killerid]);
        TextDrawSetString(YOUR_TEXTDRAW,streaktxt);
    }
    else if(KillingSpree[killerid] == 10)
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(killerid,name,sizeof(name));
        new streaktxt[128];
        format(streaktxt,sizeof(streaktxt),"~b~NEWS FLASH:~w~ %s is on a Killing Spree. Kills: %d",name,KillingSpree[killerid]);
        TextDrawSetString(YOUR_TEXTDRAW,streaktxt);
    }

    And so on...
Make a textdraw and play with that, just a general idea.
Reply
#4

Edit: Sorry, I didn't read as carefully as I should have.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)