Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //_______________________________TextDraw FilterScripta by Slick!__________________________
- #include <a_samp>
- #if defined FILTERSCRIPT
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- public OnFilterScriptInit()
- {
- //News textdraw
- new Text:NovostText;
- NovostText = TextDrawCreate(0.999990,432.999990, "Novosti:");
- TextDrawAlignment(NovostText,0);
- TextDrawBackgroundColor(NovostText,0x000000ff);
- TextDrawFont(NovostText,1);
- TextDrawLetterSize(NovostText,0.499999,1.100000);
- TextDrawColor(NovostText,COLOR_YELLOW2);
- TextDrawSetOutline(NovostText,1);
- TextDrawSetProportional(NovostText,1);
- return 1;
- }
- #endif
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256];
- new sendername[MAX_PLAYER_NAME];
- new idx;
- new string[256];
- new Text:NovostText;
- #define COLOR_GRAD2 0xBFC0C2FF
- if(strcmp(cmd, "/Novost", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /novost [text]");
- return 1;
- }
- format(string, sizeof(string), "Novosti: ~w~%s",result);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawShowForAll(NovostText);
- TextDrawSetString(NovostText,string);
- }
- }
- return 1;
- }
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement