Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------[IMPORTANTE]-----------------------------------------//
- //FILTERSCRIPT CRIADO POR DARCKWILLY
- //DIA/MÊS/ANO: 13-07-2013
- //FAVOR NÃO RETIRAR OS DEVIDOS CRÉDITOS
- //ESTÁS SOMENTE AUTORIZADO A RETIRAR OS CRÉDITOS DA LINHA 44
- //ALGUM BUG/PROBLEMA FAVOR CONTACTAR VIA FORUM-SAMP.
- //VERSÃO 1.0 FINAL
- //--------------------------------------------------------------------------------------------//
- #include <a_samp>
- #include <zcmd>
- #define SLOTS 50
- #define DIALOG_CREDITOS 6969
- #define FILTERSCRIPT
- //----------BOOL'S------------//
- new bool:JogadorTaser[SLOTS] = false;
- new bool:Tased[SLOTS] = false;
- //----------------------------//
- //---------FORWARD---------//
- forward UnTased(playerid);
- //-------------------------//
- public OnFilterScriptInit()
- {
- print("\n*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
- print("* [FilterScript] ElectroTaser [v1.0] Criado por: DarckWilly *");
- print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
- print("* [FilterScript] ElectroTaser [v1.0] Criado por: DarckWilly *");
- print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFFCCFF00FF, "Sistema ElectroTaser [v1.0} criado por DarckWilly");
- JogadorTaser[playerid] = false;
- Tased[playerid] = false;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- JogadorTaser[playerid] = false;
- Tased[playerid] = false;
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID)
- {
- if(JogadorTaser[issuerid] == true && Tased[playerid] == false && GetPlayerWeapon(issuerid) == 0)
- {
- TogglePlayerControllable(playerid,0);
- ApplyPlayerAnimation(issuerid,"KNIFE", "knife_3", 4.0, 0, 1, 0, 0, 1000);
- ApplyPlayerAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- new string[150];
- new sstring[150];
- format(string, 150, "{33CCFF}[INFO]: {FFFF99}Usaste o taser contra %s ,ele agora está paralizado durante 30 segundos.", pName(playerid));
- SendClientMessage(issuerid, -1, string);
- format(sstring, 150, "{33CCFF}[INFO]: {FFFF99}O admin %s usou o Taser contra ti, estás agora paralizado durante 30 segundos.", pNome(issuerid));
- SendClientMessage(playerid, -1, sstring);
- SetTimerEx("UnTased", 30000, 0, "i", playerid);
- Tased[playerid] = true;
- }
- }
- return 1;
- }
- public UnTased(playerid)
- {
- SendClientMessage(playerid, -1, "{33CCFF}[INFO]: {FFFF99}Acabou o tempo, voltaste ao normal.");
- TogglePlayerControllable(playerid, 1);
- ClearAnimations(playerid);
- Tased[playerid] = false;
- return 1;
- }
- //---------------STOCKS----------------//
- stock pName(playerid)
- {
- new name[21];
- GetPlayerName(playerid, name, 21);
- return name;
- }
- stock pNome(issuerid)
- {
- new nome[21];
- GetPlayerName(issuerid, nome, 21);
- return nome;
- }
- stock ApplyPlayerAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0)
- {
- ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync);
- return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
- }
- //---------------STOCKS----------------//
- //--------------COMANDO----------------//
- CMD:taser(playerid)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{CC0000}[Erro]: {FFFF99}Não tens permissão para fazer este comando.");
- {
- if(JogadorTaser[playerid] == false)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{CC0000}[ERRO]: {FFFF99}Não podes usar o Taser dentro de um veiculo.");
- {
- SendClientMessage(playerid, -1, "{33CCFF}[INFO]: {FFFF99}Estás agora com o Taser na mão.");
- SetPlayerAttachedObject(playerid, 0, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "Taser", 3000, 1);
- JogadorTaser[playerid] = true;
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "{33CCFF}[INFO]: {FFFF99}Guardaste agora o Taser.");
- RemovePlayerAttachedObject(playerid, 0);
- JogadorTaser[playerid] = false;
- }
- }
- return 1;
- }
- CMD:tasercreditos(playerid)
- {
- new string[150];
- format(string, 128, "{CC0000}\n\n[FilterScript] {FFFF99}Electro{33CCFF}Taser {FFFFFF}criado por: {99FF00}DarckWilly{33CC00}\n\nTester: {99FF00}SILV3R F0X");
- ShowPlayerDialog(playerid, DIALOG_CREDITOS, DIALOG_STYLE_MSGBOX, "{CC0000}[FILTERSCRIPT] {FFFF99}Créditos", string, "Ok", "");
- return 1;
- }
- //--------------------------------------[IMPORTANTE]-----------------------------------------//
- //FILTERSCRIPT CRIADO POR DARCKWILLY
- //DIA/MÊS/ANO: 13-07-2013
- //FAVOR NÃO RETIRAR OS DEVIDOS CRÉDITOS
- //ESTÁS SOMENTE AUTORIZADO A RETIRAR OS CRÉDITOS DA LINHA 44
- //ALGUM BUG/PROBLEMA FAVOR CONTACTAR VIA FORUM-SAMP.
- //VERSÃO 1.0 FINAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement