for(new i=0; i<MAX_PLAYERS; i++)
#include <a_samp> #include <zcmd> #include <sscanf> new Text:Textdraw2; new TRank[150]; //============================[Colors]================================ #define red 0xAA3333AA //============================[Finish of Colors]====================== public OnFilterScriptInit() { print(\"\\n--------------------------------------\"); print(\" Rank system by Private200\"); print(\"--------------------------------------\\n\"); Textdraw2 = TextDrawCreate(390.000000, 0.000000, \"Rank:~r~\"); TextDrawBackgroundColor(Textdraw2, 16711935); TextDrawFont(Textdraw2, 1); TextDrawLetterSize(Textdraw2, 0.570000, 2.700000); TextDrawColor(Textdraw2, 65535); TextDrawSetOutline(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,red,\"Rank system by Private200 integrated to the server\"); } public OnPlayerSpawn( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name TextDrawSetString(Textdraw2, string); } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2, string); TextDrawShowForPlayer( playerid, Textdraw2 ); return 1; } public OnPlayerUpdate( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name TextDrawSetString(Textdraw2, string); } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2, string); TextDrawShowForPlayer( playerid, Textdraw2 ); return 1; } COMMAND:myrank(playerid, params[]) { if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { SendClientMessage(playerid,red,\"Your rank RANK NAME 1\"); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,red,\"Your rank RANK NAME 3\"); return 1; } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { SendClientMessage(playerid,red,\"Your rank RANK NAME 4\"); return 1; } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { SendClientMessage(playerid,red,\"Your rank RANK NAME 5\"); return 1; } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { SendClientMessage(playerid,red,\"Your rank RANK NAME 6\"); return 1; } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { SendClientMessage(playerid,red,\"Your rank is RANK NAME 7\"); return 1; } else { SendClientMessage(playerid,red,\"Your rank RANK NAME is over 1000 !!!!\"); return 1; } return 1; } COMMAND:ranks(playerid, params[]) { ShowPlayerDialog(playerid, 35, DIALOG_STYLE_LIST, \"Ranks avaible on the server:\", \"Rank Name for 1000 score\\nRank Name for 700 score\\nRank Name for 500 score\\nRank Name for 200 score\\nRank Name for 100 score\\nRank name for 50 score\", \"okay\", \"Cancel\"); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn\'t required, but it\'s neater for when you implement more dialogs. { case 35:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { //I left them blank , so nothing happends when someone click them } case 1: // The second item listed { //I left them blank , so nothing happends when someone click them } case 2: // The third item listed { //I left them blank , so nothing happends when someone click them } case 3: // The third item listed { //I left them blank , so nothing happends when someone click them } case 4: // The fourth item listed { //I left them blank , so nothing happends when someone click them } case 5: // The fifht item listed { //I left them blank , so nothing happends when someone click them } case 6: // The sixth item listed { //I left them blank , so nothing happends when someone click them } } } } } return 1; }
Sziasztok!Találtam a neten egy pont alapú textdraw scriptet.Aminak az a lényege hogy ha 50 és 100 pont között vagy rank2-d vanha 500 és 1000 között rank6...Tehát pont alapján váltakozik automatikusan a textdraw.OnplayerSpawn-al jeleníti meg, OnPlayerUpdate.val pedig frissíti.És az van, hogy ha egyedül vagyok a szerveren akkor tökéletesen mûködik, viszont ha feljön 1 játékos vagy 2 akkor egyfolytában vibrál és a másik player rankjára frissíti le az enyémet...magyarul nekem van 1 es rangom a másik kettõnek 2,3 akkor folyamatosan mozog(Frissíti le a textdrawot) és sorba irja nekem is, hogy rank1, rank2, rank3(és mindig ujrakezdi)Próbálkoztam ciklussal is de nem vált be, ugyan az for(new i=0; i<MAX_PLAYERS; i++) eredetileg készített script: #include <a_samp> #include <zcmd> #include <sscanf> new Text:Textdraw2; new TRank[150]; //============================[Colors]================================ #define red 0xAA3333AA //============================[Finish of Colors]====================== public OnFilterScriptInit() { print(\"\\n--------------------------------------\"); print(\" Rank system by Private200\"); print(\"--------------------------------------\\n\"); Textdraw2 = TextDrawCreate(390.000000, 0.000000, \"Rank:~r~\"); TextDrawBackgroundColor(Textdraw2, 16711935); TextDrawFont(Textdraw2, 1); TextDrawLetterSize(Textdraw2, 0.570000, 2.700000); TextDrawColor(Textdraw2, 65535); TextDrawSetOutline(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,red,\"Rank system by Private200 integrated to the server\"); } public OnPlayerSpawn( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name TextDrawSetString(Textdraw2, string); } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2, string); TextDrawShowForPlayer( playerid, Textdraw2 ); return 1; } public OnPlayerUpdate( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name TextDrawSetString(Textdraw2, string); } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2, string); TextDrawShowForPlayer( playerid, Textdraw2 ); return 1; } COMMAND:myrank(playerid, params[]) { if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { SendClientMessage(playerid,red,\"Your rank RANK NAME 1\"); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,red,\"Your rank RANK NAME 3\"); return 1; } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { SendClientMessage(playerid,red,\"Your rank RANK NAME 4\"); return 1; } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { SendClientMessage(playerid,red,\"Your rank RANK NAME 5\"); return 1; } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { SendClientMessage(playerid,red,\"Your rank RANK NAME 6\"); return 1; } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { SendClientMessage(playerid,red,\"Your rank is RANK NAME 7\"); return 1; } else { SendClientMessage(playerid,red,\"Your rank RANK NAME is over 1000 !!!!\"); return 1; } return 1; } COMMAND:ranks(playerid, params[]) { ShowPlayerDialog(playerid, 35, DIALOG_STYLE_LIST, \"Ranks avaible on the server:\", \"Rank Name for 1000 score\\nRank Name for 700 score\\nRank Name for 500 score\\nRank Name for 200 score\\nRank Name for 100 score\\nRank name for 50 score\", \"okay\", \"Cancel\"); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn\'t required, but it\'s neater for when you implement more dialogs. { case 35:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { //I left them blank , so nothing happends when someone click them } case 1: // The second item listed { //I left them blank , so nothing happends when someone click them } case 2: // The third item listed { //I left them blank , so nothing happends when someone click them } case 3: // The third item listed { //I left them blank , so nothing happends when someone click them } case 4: // The fourth item listed { //I left them blank , so nothing happends when someone click them } case 5: // The fifht item listed { //I left them blank , so nothing happends when someone click them } case 6: // The sixth item listed { //I left them blank , so nothing happends when someone click them } } } } } return 1; } Aki érti hogy mi a bajom, és tud is rá valamit azt szépen kérem hogy minél elõbb segítsen!Köszönöm.
#include <a_samp> #include <zcmd> #include <sscanf> new Text:Textdraw2[MAX_PLAYERS]; new TRank[150]; //============================[Colors]================================ #define red 0xAA3333AA //============================[Finish of Colors]====================== public OnFilterScriptInit() { print(\"\\n--------------------------------------\"); print(\" Rank system by Private200\"); print(\"--------------------------------------\\n\"); for(new i=0;i<MAX_PLAYERS;i++) { Textdraw2 = TextDrawCreate(390.000000, 0.000000, \"Rank:~r~\"); TextDrawBackgroundColor(Textdraw2, 16711935); TextDrawFont(Textdraw2, 1); TextDrawLetterSize(Textdraw2, 0.570000, 2.700000); TextDrawColor(Textdraw2, 65535); TextDrawSetOutline(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); } return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,red,\"Rank system by Private200 integrated to the server\"); } public OnPlayerSpawn( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2[playerid], string); TextDrawShowForPlayer( playerid, Textdraw2[playerid] ); return 1; } public OnPlayerUpdate( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2[playerid], string); TextDrawShowForPlayer( playerid, Textdraw2[playerid] ); return 1; } COMMAND:myrank(playerid, params[]) { if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { SendClientMessage(playerid,red,\"Your rank RANK NAME 1\"); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,red,\"Your rank RANK NAME 3\"); return 1; } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { SendClientMessage(playerid,red,\"Your rank RANK NAME 4\"); return 1; } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { SendClientMessage(playerid,red,\"Your rank RANK NAME 5\"); return 1; } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { SendClientMessage(playerid,red,\"Your rank RANK NAME 6\"); return 1; } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { SendClientMessage(playerid,red,\"Your rank is RANK NAME 7\"); return 1; } else { SendClientMessage(playerid,red,\"Your rank RANK NAME is over 1000 !!!!\"); return 1; } return 1; } COMMAND:ranks(playerid, params[]) { ShowPlayerDialog(playerid, 35, DIALOG_STYLE_LIST, \"Ranks avaible on the server:\", \"Rank Name for 1000 score\\nRank Name for 700 score\\nRank Name for 500 score\\nRank Name for 200 score\\nRank Name for 100 score\\nRank name for 50 score\", \"okay\", \"Cancel\"); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn\'t required, but it\'s neater for when you implement more dialogs. { case 35:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { //I left them blank , so nothing happends when someone click them } case 1: // The second item listed { //I left them blank , so nothing happends when someone click them } case 2: // The third item listed { //I left them blank , so nothing happends when someone click them } case 3: // The third item listed { //I left them blank , so nothing happends when someone click them } case 4: // The fourth item listed { //I left them blank , so nothing happends when someone click them } case 5: // The fifht item listed { //I left them blank , so nothing happends when someone click them } case 6: // The sixth item listed { //I left them blank , so nothing happends when someone click them } } } } } return 1;}
Sziasztok!Találtam a neten egy pont alapú textdraw scriptet.Aminak az a lényege hogy ha 50 és 100 pont között vagy rank2-d vanha 500 és 1000 között rank6...Tehát pont alapján váltakozik automatikusan a textdraw.OnplayerSpawn-al jeleníti meg, OnPlayerUpdate.val pedig frissíti.És az van, hogy ha egyedül vagyok a szerveren akkor tökéletesen mûködik, viszont ha feljön 1 játékos vagy 2 akkor egyfolytában vibrál és a másik player rankjára frissíti le az enyémet...magyarul nekem van 1 es rangom a másik kettõnek 2,3 akkor folyamatosan mozog(Frissíti le a textdrawot) és sorba irja nekem is, hogy rank1, rank2, rank3(és mindig ujrakezdi)Próbálkoztam ciklussal is de nem vált be, ugyan az for(new i=0; i<MAX_PLAYERS; i++) eredetileg készített script: #include <a_samp> #include <zcmd> #include <sscanf> new Text:Textdraw2; new TRank[150]; //============================[Colors]================================ #define red 0xAA3333AA //============================[Finish of Colors]====================== public OnFilterScriptInit() { print(\"\\n--------------------------------------\"); print(\" Rank system by Private200\"); print(\"--------------------------------------\\n\"); Textdraw2 = TextDrawCreate(390.000000, 0.000000, \"Rank:~r~\"); TextDrawBackgroundColor(Textdraw2, 16711935); TextDrawFont(Textdraw2, 1); TextDrawLetterSize(Textdraw2, 0.570000, 2.700000); TextDrawColor(Textdraw2, 65535); TextDrawSetOutline(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,red,\"Rank system by Private200 integrated to the server\"); } public OnPlayerSpawn( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name TextDrawSetString(Textdraw2, string); } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2, string); TextDrawShowForPlayer( playerid, Textdraw2 ); return 1; } public OnPlayerUpdate( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name TextDrawSetString(Textdraw2, string); } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name TextDrawSetString(Textdraw2, string); } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2, string); TextDrawShowForPlayer( playerid, Textdraw2 ); return 1; } COMMAND:myrank(playerid, params[]) { if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { SendClientMessage(playerid,red,\"Your rank RANK NAME 1\"); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,red,\"Your rank RANK NAME 3\"); return 1; } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { SendClientMessage(playerid,red,\"Your rank RANK NAME 4\"); return 1; } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { SendClientMessage(playerid,red,\"Your rank RANK NAME 5\"); return 1; } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { SendClientMessage(playerid,red,\"Your rank RANK NAME 6\"); return 1; } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { SendClientMessage(playerid,red,\"Your rank is RANK NAME 7\"); return 1; } else { SendClientMessage(playerid,red,\"Your rank RANK NAME is over 1000 !!!!\"); return 1; } return 1; } COMMAND:ranks(playerid, params[]) { ShowPlayerDialog(playerid, 35, DIALOG_STYLE_LIST, \"Ranks avaible on the server:\", \"Rank Name for 1000 score\\nRank Name for 700 score\\nRank Name for 500 score\\nRank Name for 200 score\\nRank Name for 100 score\\nRank name for 50 score\", \"okay\", \"Cancel\"); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn\'t required, but it\'s neater for when you implement more dialogs. { case 35:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { //I left them blank , so nothing happends when someone click them } case 1: // The second item listed { //I left them blank , so nothing happends when someone click them } case 2: // The third item listed { //I left them blank , so nothing happends when someone click them } case 3: // The third item listed { //I left them blank , so nothing happends when someone click them } case 4: // The fourth item listed { //I left them blank , so nothing happends when someone click them } case 5: // The fifht item listed { //I left them blank , so nothing happends when someone click them } case 6: // The sixth item listed { //I left them blank , so nothing happends when someone click them } } } } } return 1; } Aki érti hogy mi a bajom, és tud is rá valamit azt szépen kérem hogy minél elõbb segítsen!Köszönöm. mit kapok, ha megoldom? Spoiler for Vibrálás, és bug nélkül, a loose identional-t az init-nél meg megoldod :): #include <a_samp> #include <zcmd> #include <sscanf> new Text:Textdraw2[MAX_PLAYERS]; new TRank[150]; //============================[Colors]================================ #define red 0xAA3333AA //============================[Finish of Colors]====================== public OnFilterScriptInit() { print(\"\\n--------------------------------------\"); print(\" Rank system by Private200\"); print(\"--------------------------------------\\n\"); for(new i=0;i<MAX_PLAYERS;i++) { Textdraw2 = TextDrawCreate(390.000000, 0.000000, \"Rank:~r~\"); TextDrawBackgroundColor(Textdraw2, 16711935); TextDrawFont(Textdraw2, 1); TextDrawLetterSize(Textdraw2, 0.570000, 2.700000); TextDrawColor(Textdraw2, 65535); TextDrawSetOutline(Textdraw2, 1); TextDrawSetProportional(Textdraw2, 1); } return 1; } public OnPlayerConnect(playerid) { SendClientMessage(playerid,red,\"Rank system by Private200 integrated to the server\"); } public OnPlayerSpawn( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2[playerid], string); TextDrawShowForPlayer( playerid, Textdraw2[playerid] ); return 1; } public OnPlayerUpdate( playerid ) { new string[ 128 ]; if(GetPlayerScore(playerid) >= 1000) { TRank = \"6\"; /// The rank name } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { TRank = \"5\"; /// The rank name } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { TRank = \"4\"; /// The rank name } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { TRank = \"3\"; /// The rank name } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { TRank = \"2\"; /// The rank name } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { TRank = \"1\"; /// The rank name } else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { TRank = \"0\"; /// The rank name } format( string, sizeof string, \"~y~Rank:~w~ %s\",TRank); TextDrawSetString(Textdraw2[playerid], string); TextDrawShowForPlayer( playerid, Textdraw2[playerid] ); return 1; } COMMAND:myrank(playerid, params[]) { if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 50) { SendClientMessage(playerid,red,\"Your rank RANK NAME 1\"); } else if(GetPlayerScore(playerid) >= 50 && GetPlayerScore(playerid) < 100) { SendClientMessage(playerid,red,\"Your rank RANK NAME 3\"); return 1; } else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) { SendClientMessage(playerid,red,\"Your rank RANK NAME 4\"); return 1; } else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) { SendClientMessage(playerid,red,\"Your rank RANK NAME 5\"); return 1; } else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 700) { SendClientMessage(playerid,red,\"Your rank RANK NAME 6\"); return 1; } else if(GetPlayerScore(playerid) >= 700 && GetPlayerScore(playerid) < 1000) { SendClientMessage(playerid,red,\"Your rank is RANK NAME 7\"); return 1; } else { SendClientMessage(playerid,red,\"Your rank RANK NAME is over 1000 !!!!\"); return 1; } return 1; } COMMAND:ranks(playerid, params[]) { ShowPlayerDialog(playerid, 35, DIALOG_STYLE_LIST, \"Ranks avaible on the server:\", \"Rank Name for 1000 score\\nRank Name for 700 score\\nRank Name for 500 score\\nRank Name for 200 score\\nRank Name for 100 score\\nRank name for 50 score\", \"okay\", \"Cancel\"); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn\'t required, but it\'s neater for when you implement more dialogs. { case 35:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { //I left them blank , so nothing happends when someone click them } case 1: // The second item listed { //I left them blank , so nothing happends when someone click them } case 2: // The third item listed { //I left them blank , so nothing happends when someone click them } case 3: // The third item listed { //I left them blank , so nothing happends when someone click them } case 4: // The fourth item listed { //I left them blank , so nothing happends when someone click them } case 5: // The fifht item listed { //I left them blank , so nothing happends when someone click them } case 6: // The sixth item listed { //I left them blank , so nothing happends when someone click them } } } } } return 1;} [/quote] TextDrawSetString(Textdraw2, string); ezt már próbáltam, azért is irtam ide...abár most hogy ezen igy elgondolkodom...lehet hogy a próbát mentettem le és nem raktam be a szervermappába... :hmmm:
TextDrawSetString(Textdraw2, string);
hidd el, kipróbáltuk tesztszerveren egy adminommal.mûködik.