Jump to content
  • 0

hit


xxSPEEDYxx

Question

salls

vreau sa fac comanda asta:

if(!strcmp(cmdtext, "/hits", true))
        {
                new count = 0;
                SendClientMessage(playerid, COLOR_MSG, "Listing currently placed hits:");
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                        if(IsPlayerConnected(i) && hit[i] > 0)
                        {
                                new string[256];
                                format(string, 256, "Hit on %s (%i) for $%i", ReturnPlayerName(i), i, hit[i]);
                                SendClientMessage(playerid, COLOR_FOUND, string);
                                count++;
}
                }
                if(count == 0)
                {
                        SendClientMessage(playerid, COLOR_ERROR, "No hits placed at this time!");
                }
        }
        return 0;
}

sa arate acolo cand scriu /hits sa fie in dialog nu cu sendclientmessage...cum se poate face...pls help!!

Fara reclama in semnatura!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Incearca asa:

[pawn]

//sus in script pui

#define DIALOG_HITS dialog //schimba "dialog" cu ce id vrei sa aibe dialogul

//comanda

if(strcmp(cmdtext, "/hits", true) == 0)

{

new count = 0, string[ 2048 ];

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i) && hit > 0)

{

format(string, 2048, "%s\nHit on %s (%i) for $%i", string, ReturnPlayerName(i), i, hit);

count++;

}

}

if(count == 0) { format(string, 128, "\nNo hits placed at this time !"); }

return ShowPlayerDialog(playerid, DIALOG_HITS, DIALOG_STYLE_MSGBOX, "Listing currently placed hits:", string, "OK", "");

}

[/pawn]

Sper sa mearga.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.