04.09.2013, 00:45
Hello everyone Here a simple Score Textdraw Made 100% By ME
IMAGES:
[B]
The Image is in Spanish.
[/B]AND: THE CODE
Код:
#include <a_samp> #pragma tabsize 0 new Text:ScoreTd[MAX_PLAYERS]; #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { SetTimer("timersc", 1000, true);//1 SECOND TO ACTUALIZE THE TEXTDRAW return 1; } public OnPlayerConnect(playerid) { new score[128]; format(score, sizeof(score), "Score:%d",GetPlayerScore(playerid)); ScoreTd[playerid] = TextDrawCreate(419 ,6, score); TextDrawColor(ScoreTd[playerid], 0x33AA33AA); TextDrawAlignment(ScoreTd[playerid],0); TextDrawFont(ScoreTd[playerid], 3); TextDrawShowForPlayer(playerid, ScoreTd[playerid]); TextDrawSetOutline(ScoreTd[playerid],1); TextDrawSetProportional(ScoreTd[playerid],1); TextDrawSetShadow(ScoreTd[playerid],0); return 1; } public OnPlayerDisconnect(playerid, reason) { TextDrawDestroy(ScoreTd[playerid]); return 1; } forward timersc(playerid); public timersc() { for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new score2[128]; format(score2, sizeof(score2), "%d",GetPlayerScore(i)); TextDrawSetString(ScoreTd[i], score2); } } return 1; }
I know that the FS is Simple, but i do this for NEWBIES, THANKS