#include <a_samp>#include <dini>#if defined MAX_PLAYERS#undef MAX_PLAYERS#endif#define MAX_PLAYERS 50 // írd át arra a számra ahány slotos a szervernew kills[MAX_PLAYERS];stock CheckKills(playerid) {switch(kills[playerid]) { case 1: SendClientMessage(playerid,-1,\"Első ölés!\"); case 100: SendClientMessage(playerid,-1,\"100. ölés!\");}}public OnPlayerConnect(playerid){new n[32];GetPlayerName(playerid,n,32);format(n,32,\"%s.kills\",n);dini_Create(n);if(dini_Isset(n,\"Kills\")) { kills[playerid] = dini_Int(n,\"Kills\");} else { kills[playerid] = 0;}return 1;}public OnPlayerDisconnect(playerid, reason){new n[32];GetPlayerName(playerid,n,32);format(n,32,\"%s.kills\",n);dini_IntSet(n,\"Kills\",kills[playerid]);return 1;}public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/mykills\", cmdtext, true, 10) == 0){new string[16];format(string,16,\"Öléseid: %d\",kills[playerid]);return 1;}return 0;}
De én olyant szeretnek amihez vannak juttalmak mind mas szerokban.
Ugye nem azt várod el hogy más megírja helyetted?
#include <a_samp>new Text:playerscoretext;new Text:playerscoretext2;new Text:playerscoretext3;new Text:playerscoretext4;#define RANK1NAME \"Szint: 1\"#define RANK2NAME \"Szint: 2\"#define RANK3NAME \"Szint: 3\"#define RANK4NAME \"Szint: 4\"#define RANK1SCOREa 0#define RANK1SCOREb 99#define RANK2SCOREa 100#define RANK2SCOREb 249#define RANK3SCOREa 250#define RANK3SCOREb 999#define RANK4SCORE 1000public OnFilterScriptInit(){playerscoretext3 = TextDrawCreate(413.0,103.0,RANK3NAME); playerscoretext4 = TextDrawCreate(413.0,103.0,RANK4NAME);playerscoretext = TextDrawCreate(413.0,103.0,RANK1NAME); playerscoretext2 = TextDrawCreate(413.0,103.0,RANK2NAME);return 1;}public OnFilterScriptExit(){TextDrawDestroy(playerscoretext);TextDrawDestroy(playerscoretext2);TextDrawDestroy(playerscoretext3);TextDrawDestroy(playerscoretext4);return 1;}public OnPlayerUpdate(playerid){if GetPlayerScore(playerid) >= RANK1SCOREa && GetPlayerScore(playerid) <=RANK2SCOREb*then{ TextDrawUseBox(playerscoretext, 1);TextDrawBoxColor(playerscoretext, 0x000000FF);TextDrawSetShadow(playerscoretext,0);TextDrawShowForPlayer(playerid, playerscoretext); TextDrawHideForPlayer(playerid, playerscoretext2); TextDrawHideForPlayer(playerid, playerscoretext3); TextDrawHideForPlayer(playerid, playerscoretext4);}if GetPlayerScore(playerid) >= RANK2SCOREa && GetPlayerScore(playerid) <=RANK2SCOREb*then{TextDrawUseBox(playerscoretext2, 1);TextDrawBoxColor(playerscoretext2, 0x000000FF);TextDrawSetShadow(playerscoretext2,0);TextDrawShowForPlayer(playerid, playerscoretext2);TextDrawHideForPlayer(playerid, playerscoretext);TextDrawHideForPlayer(playerid, playerscoretext4);TextDrawHideForPlayer(playerid, playerscoretext3);SetPlayerHealth(playerid, 99999);}if GetPlayerScore(playerid) >= RANK3SCOREa && GetPlayerScore(playerid) <=RANK3SCOREb*then{TextDrawUseBox(playerscoretext3, 1);TextDrawBoxColor(playerscoretext3, 0x000000FF);TextDrawSetShadow(playerscoretext3,0);TextDrawShowForPlayer(playerid, playerscoretext3);TextDrawHideForPlayer(playerid, playerscoretext);TextDrawHideForPlayer(playerid, playerscoretext2);TextDrawHideForPlayer(playerid, playerscoretext4);}if GetPlayerScore(playerid) >= RANK4SCORE*then{TextDrawUseBox(playerscoretext4, 1);TextDrawBoxColor(playerscoretext4, 0x000000FF);TextDrawSetShadow(playerscoretext4,0);TextDrawShowForPlayer(playerid, playerscoretext4);TextDrawHideForPlayer(playerid, playerscoretext);TextDrawHideForPlayer(playerid, playerscoretext2);TextDrawHideForPlayer(playerid, playerscoretext3);}return 1;}public OnPlayerDeath(playerid,killerid,reason){TextDrawHideForPlayer(playerid, playerscoretext);TextDrawHideForPlayer(playerid, playerscoretext2);TextDrawHideForPlayer(playerid, playerscoretext3); TextDrawHideForPlayer(playerid, playerscoretext4); SetPlayerScore(killerid,GetPlayerScore(killerid)+1);return 1;}