Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~||
- ||~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~||
- || ____ ___ _____ _____ _______ ||
- || \ | \ | | \ \ / / | \ / ||
- || ======== \ | \ | | \ \ _ / / | |\ \ / ======== ||
- || | | \| | \ \/ \/ / | | | | | ||
- || ======== / | \ | \ /\ / | |/ / \ ======== ||
- || / |____|\_____| \___/ \___/ |_______/ \ ||
- || [FS] Anuncios by: [NWD]Jim._.Carrey ||
- ||~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~||
- || Agradecimentos a PooweeR e Kasura ||
- ||~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~||
- || •--»| Brasil • World Wicked - RpG • [NWD]™ |«--• ~> 199.187.121.157:7791 ||
- ||~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~<~>~<~~>~||*/
- #include <a_samp>
- #define COR_ERRO 0xFF0000DD
- #define COR_ANS 0xFFFFFFAA
- #define COR_ADM 0x007FFFAA
- #define ANNTIPOS 77713
- new Text:anuncio,Text:anuncio1,Text:anuncio2,Text:anuncio3;
- new pName[MAX_PLAYER_NAME];
- new bool:JaTemAnuncio;
- forward OnPlayerRemoveTextDraw();
- forward OnPlayerRemoveTextDraw1();
- forward OnPlayerRemoveTextDraw2();
- forward OnPlayerRemoveTextDraw3();
- forward OnPlayerAnuncio();
- public OnFilterScriptInit()
- {
- anuncio = TextDrawCreate(90.000000,220.000000,"[NWD]Jim._.Carrey");
- anuncio1 = TextDrawCreate(90.000000,220.000000,"[NWD]Jim._.Carrey");
- anuncio2 = TextDrawCreate(90.000000,220.000000,"[NWD]Jim._.Carrey");
- anuncio3 = TextDrawCreate(90.000000,220.000000,"[NWD]Jim._.Carrey");// No Flood!
- TextDrawAlignment(anuncio, 0);
- TextDrawAlignment(anuncio1, 0);
- TextDrawAlignment(anuncio2, 0);
- TextDrawAlignment(anuncio3, 0);
- TextDrawBackgroundColor(anuncio, 0x000000AA);
- TextDrawBackgroundColor(anuncio1, 0x000000AA);
- TextDrawBackgroundColor(anuncio2, 0x000000AA);
- TextDrawBackgroundColor(anuncio3, 0x000000AA);
- TextDrawFont(anuncio, 0);
- TextDrawFont(anuncio1, 1);
- TextDrawFont(anuncio2, 2);
- TextDrawFont(anuncio3, 3);
- TextDrawLetterSize(anuncio,0.439999,1.700000);
- TextDrawLetterSize(anuncio1,0.439999,1.700000);
- TextDrawLetterSize(anuncio2,0.439999,1.700000);
- TextDrawLetterSize(anuncio3,0.439999,1.700000);
- TextDrawColor(anuncio, 0xFFFFFFAA);
- TextDrawColor(anuncio1, 0xFFFFFFAA);
- TextDrawColor(anuncio2, 0xFFFFFFAA);
- TextDrawColor(anuncio3, 0xFFFFFFAA);
- TextDrawSetOutline(anuncio, 1);
- TextDrawSetOutline(anuncio1, 1);
- TextDrawSetOutline(anuncio2, 1);
- TextDrawSetOutline(anuncio3, 1);
- TextDrawSetProportional(anuncio, 0);
- TextDrawSetProportional(anuncio1, 0);
- TextDrawSetProportional(anuncio2, 0);
- TextDrawSetProportional(anuncio3, 0);
- TextDrawSetShadow(anuncio, 1);
- TextDrawSetShadow(anuncio1, 1);
- TextDrawSetShadow(anuncio2, 1);
- TextDrawSetShadow(anuncio3, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawHideForAll(anuncio);
- TextDrawDestroy(anuncio);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawHideForAll(anuncio);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[128],idx,string[256];
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/anunciar", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~p~ %s", result);
- TextDrawSetString(anuncio, string);
- TextDrawShowForAll(anuncio);
- SetTimerEx("OnPlayerRemoveTextDraw", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/anunciar1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar1 [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~r~ %s diz:~w~ %s", pName, result);
- TextDrawSetString(anuncio,string);
- TextDrawShowForAll(anuncio);
- SetTimerEx("OnPlayerRemoveTextDraw", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/anun", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~b~ %s", result);
- TextDrawSetString(anuncio1, string);
- TextDrawShowForAll(anuncio1);
- SetTimerEx("OnPlayerRemoveTextDraw1", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/anun1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar1 [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~p~ %s diz:~w~ %s", pName, result);
- TextDrawSetString(anuncio1,string);
- TextDrawShowForAll(anuncio1);
- SetTimerEx("OnPlayerRemoveTextDraw1", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/anc", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~g~ %s", result);
- TextDrawSetString(anuncio2, string);
- TextDrawShowForAll(anuncio2);
- SetTimerEx("OnPlayerRemoveTextDraw2", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/anc1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar1 [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~g~ %s diz:~w~ %s", pName, result);
- TextDrawSetString(anuncio2,string);
- TextDrawShowForAll(anuncio2);
- SetTimerEx("OnPlayerRemoveTextDraw2", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/aann", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~y~ %s", result);
- TextDrawSetString(anuncio3, string);
- TextDrawShowForAll(anuncio3);
- SetTimerEx("OnPlayerRemoveTextDraw3", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/aann1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(JaTemAnuncio == true) return SendClientMessage(playerid, COR_ERRO, "[ERRO] Já tem um anuncio na tela, aguarde ele sair para fazer outro!");
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anunciar1 [Texto]");
- return 1;
- }
- format(string, sizeof(string), "~y~ %s diz:~w~ %s", pName, result);
- TextDrawSetString(anuncio3,string);
- TextDrawShowForAll(anuncio3);
- SetTimerEx("OnPlayerRemoveTextDraw3", 10000, true, "i", playerid);
- JaTemAnuncio = true;
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/anm", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /anm [Texto]");
- return 1;
- }
- format(string, sizeof(string), "|ATENÇÃO| O Administrador %s, diz: %s", pName, result);
- SendClientMessageToAll(COR_ADM,string);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/an", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /an [Texto]");
- return 1;
- }
- format(string,sizeof(string),"~r~%s",result);
- GameTextForAll(string, 7000, 0);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/an1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /an1 [Texto]");
- return 1;
- }
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,sizeof(string),"~y~%s ~w~diz: ~g~%s",pName,result);
- GameTextForAll(string, 7000, 0);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/ann", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /ann [Texto]");
- return 1;
- }
- format(string,sizeof(string),"~p~%s",result);
- GameTextForAll(string, 7000, 1);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/ann1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /ann1 [Texto]");
- return 1;
- }
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,sizeof(string),"~w~%s ~r~diz: ~w~%s",pName,result);
- GameTextForAll(string, 7000, 1);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/tnn", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /tnn [Texto]");
- return 1;
- }
- format(string,sizeof(string),"~g~]~w~ %s ~g~]",result);
- GameTextForAll(string, 7000, 3);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/tnn1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /tnn1 [Texto]");
- return 1;
- }
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,sizeof(string),"~g~]~r~%s ~w~diz: ~w~%s ~g~]",pName,result);
- GameTextForAll(string, 7000, 3);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/mn", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /mn [Texto]");
- return 1;
- }
- format(string,sizeof(string),"~p~]~y~ %s ~p~]",result);
- GameTextForAll(string, 7000, 4);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/mn1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /mn1 [Texto]");
- return 1;
- }
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,sizeof(string),"~w~%s ~w~diz: ~r~%s",pName,result);
- GameTextForAll(string, 7000, 4);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/fn", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /fn [Texto]");
- return 1;
- }
- format(string,sizeof(string),"~r~%s",result);
- GameTextForAll(string, 7000, 5);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/fn1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /fn1 [Texto]");
- return 1;
- }
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,sizeof(string),"~r~%s ~w~diz: ~w~%s",pName,result);
- GameTextForAll(string, 7000, 5);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/dn", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /dn [Texto]");
- return 1;
- }
- format(string,sizeof(string),"~b~%s",result);
- GameTextForAll(string, 7000, 6);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/dn1", true) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerName(playerid, pName, sizeof(pName));
- 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, COR_ERRO, "[ERRO] Uso correto: /dn1 [Texto]");
- return 1;
- }
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string,sizeof(string),"~b~%s ~w~diz: ~b~%s",pName,result);
- GameTextForAll(string, 7000, 6);
- }
- else
- {
- SendClientMessage(playerid, COR_ERRO, "[ERRO] Você não é Administrador!");
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/aTipos", true) == 0)
- {
- SendClientMessage(playerid, COR_ERRO, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, COR_ANS, "» Tipo SendClientMessage: /anm [Texto]");
- SendClientMessage(playerid, COR_ANS, "» Tipo TextDraw 0: /anunciar [Texto] /anunciar1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» Tipo TextDraw 1: /anunciar [Texto] /anunciar1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» Tipo TextDraw 2: /anunciar [Texto] /anunciar1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» Tipo TextDraw 3: /anunciar [Texto] /anunciar1 [Texto]");
- SendClientMessage(playerid, COR_ERRO, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- return 1;
- }
- if(strcmp(cmd, "/aTipos1", true) == 0)
- {
- SendClientMessage(playerid, COR_ERRO, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, COR_ANS, "» GameText Tipo 0: /an [Texto] /an1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» GameText Tipo 1: /ann [Texto] /ann1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» GameText Tipo 3: /tnn [Texto] /tnn1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» GameText Tipo 4: /mn [Texto] /mn1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» GameText Tipo 5: /fn [Texto] /fn1 [Texto]");
- SendClientMessage(playerid, COR_ANS, "» GameText Tipo 6: /dn [Texto] /dn1 [Texto]");
- SendClientMessage(playerid, COR_ERRO, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- return 1;
- }
- if(strcmp("/tiposA", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, ANNTIPOS, DIALOG_STYLE_MSGBOX, "~» Tipos de Anúncios","» /anm [texto]\n» /anunciar [texto] /anunciar1 [Texto]\n» /anun [texto] /anun1 [texto]\n» /anc [texto] /anc1 [texto]\n» /aann [texto] /aann1 [texto]\n» /an [Texto] /an1 [Texto]\n» /ann [Texto] /ann1 [Texto]\n» /tnn [Texto] /tnn1 [Texto]\n» /mn [Texto] /mn1 [Texto]\n» /fn [Texto] /fn1 [Texto]\n» /dn [Texto] /dn1 [Texto]\n» By: [NWD]Jim._.Carrey","Ok","Ok");
- return 1;
- }
- return 0;
- }
- //-----------------------------------------------------------------------------------------------------------
- public OnPlayerRemoveTextDraw()
- {
- TextDrawHideForAll(anuncio);
- JaTemAnuncio = false;
- return 1;
- }
- public OnPlayerRemoveTextDraw1()
- {
- TextDrawHideForAll(anuncio1);
- JaTemAnuncio = false;
- return 1;
- }
- public OnPlayerRemoveTextDraw2()
- {
- TextDrawHideForAll(anuncio2);
- JaTemAnuncio = false;
- return 1;
- }
- public OnPlayerRemoveTextDraw3()
- {
- TextDrawHideForAll(anuncio3);
- JaTemAnuncio = false;
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index,result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- //-----------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement