[FilterScript] stats cheacker by keymon
#1

Код:
  // stats cheacker by keymon//
 //------------------------------------------------------------------------//
    #include <a_samp>
    #pragma tabsize 0
    #define Dialogonclick 700

    new c_score,c_money,Float:c_health,Float:c_armour,c_deaths,c_kills;
    enum k_m{ Kills, Deaths,}
    new c_stat[MAX_PLAYERS][k_m];
    new PlayerName[MAX_PLAYER_NAME];
    new string[150];
    new msgbox[150];
    public OnFilterScriptInit()
    {
    //
    //optional: SendClientMessageToAll(0xFFFFFFAA,"[INFO] FS Stats by click(by keymon) loaded.");
    //Don't remove:
            print("\n--------------------------------------");
            print("-----STates cheacker by Keymon--\n");
            print("---------------16/01/2010-------------\n");
            print("---------------Loaded-----------------\n");
            return 1;
    }

    public OnPlayerDeath(playerid, killerid, reason)
    {
    c_stat[playerid][Deaths]++;//1? Deaths - Warning! Shift the sequency will result in problems.
    c_stat[killerid][Kills]++;//2? Kills
    return 1;
    }
    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    c_score=GetPlayerScore(clickedplayerid);
    GetPlayerHealth(clickedplayerid,c_health);
    GetPlayerArmour(clickedplayerid,c_armour);
    c_money=GetPlayerMoney(clickedplayerid);
    c_deaths=c_stat[clickedplayerid][Deaths];
    c_kills=c_stat[clickedplayerid][Kills];
    GetPlayerName(clickedplayerid,PlayerName,MAX_PLAYER_NAME);
    format(PlayerName,sizeof PlayerName,"%s's status.",PlayerName);
    msgbox="Score:    %d\n\nMoney:    %d\n\nHealth:    %.1f\n\nArmour:    %.1f\n\nDeaths:    %d\n\nKilled:    %d";
    format(string,sizeof string,msgbox,c_score,c_money,c_health,c_armour,c_deaths,c_kills);
    ShowPlayerDialog(playerid,Dialogonclick,0,PlayerName,string,"OK","EXIT");
            return 1;
    }

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==Dialogonclick){ if(!response){return 0;}/* <=  EXIT Button*/}
    return 1;}

    public OnFilterScriptExit()
    {
    //optional: SendClientMessageToAll(0xFFFFFFAA,"[INFO] FS Stats by click(by keymon) unloaded.");
            return 1;
    }
    /*
    Por favor ao usar o FS ou colocar as fun??es em seu GM,
    deixe os cr?ditos do devido criador.
    ________________________________________________________

    without any bugs maded by keymon :-) id u want some more scripts u can add ahadhunzai@yahoo.com
    */
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)