Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Sistema idealizado e criado por Jeferson
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- // Variaves
- new id1,
- id2,
- Tempox1 = 3,
- bool:Tendox1,
- bool:TaNoX1[MAX_PLAYERS];
- // Cores
- #define COR_JEFF 0xFF0000FF
- #define COR_JEFF2 0xBFC0C2FF
- #define COR_JEFF3 0xFF0000AA
- public OnFilterScriptInit()
- {
- print("\n----------------------------------------");
- print(" Evento One vs One | By: Queen");
- print(" Carregado com sucesso!");
- print("-----------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n----------------------------------------");
- print(" Evento One vs One | By: Queen");
- print(" Desligado com sucesso!");
- print("-----------------------------------------\n");
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[128];
- if(TaNoX1[playerid])
- {
- if(id1 == killerid)
- {
- format(string, sizeof(string), "[One vs One]: {00FFFF}%s {FFFFFF}Ganhou o x1 contra o {00FFFF}%s!", Nome(id1), Nome(id2));
- SendClientMessageToAll(COR_JEFF, string);
- }
- else if(id2 == killerid)
- {
- format(string, sizeof(string), "[One vs One]: {00FFFF}%s {FFFFFF}Ganhou o x1 contra o {00FFFF}%s!", Nome(id2), Nome(id1));
- SendClientMessageToAll(COR_JEFF, string);
- }
- TaNoX1[id1] =
- TaNoX1[id2] =
- Tendox1 = false;
- }
- return 1;
- }
- forward DescongelarJeff();
- public DescongelarJeff()
- {
- new string[126];
- if(Tempox1 == 0)
- {
- format(string, sizeof(string),"%d", Tempox1);
- GameTextForPlayer(id1,"~g~Go Go Go!", 1000, 6);
- GameTextForPlayer(id2,"~g~Go Go Go!", 1000, 6);
- TogglePlayerControllable(id1, 1);
- TogglePlayerControllable(id2, 1);
- Tempox1 = 3;
- }
- else
- {
- format(StrJEFF, sizeof(StrJEFF),"%d", Tempox1);
- GameTextForPlayer(id1, StrJEFF, 1000, 6);
- GameTextForPlayer(id2, StrJEFF, 1000, 6);
- SetTimer("DescongelarJeff", 1000, 0);
- Tempox1--;
- }
- return true;
- }
- CMD:x1(playerid,params[])
- {
- new string[128];
- if(sscanf(params, "uu", id1, id2))
- return SendClientMessage(playerid, COR_JEFF2, "[Uso]: /x1 [id1] [id2]");
- if(!IsPlayerConnected(id1))
- return SendClientMessage(playerid, COR_JEFF3, "[Erro]: Player 1 não está conectado!");
- if(!IsPlayerConnected(id2))
- return SendClientMessage(playerid, COR_JEFF3, "[Erro]: Player 2 não está conectado!");
- if(Tendox1)
- return SendClientMessage(playerid, -1, "[Erro]: O 'one vs one' já começou, espere acabar para começar outro!");
- if(!IsPlayerAdmin(playerid))
- return SendClientMessage(playerid, COR_JEFF2, "[Erro]: Você não é um admin logado na RCON");
- SetPlayerPos(id1, 1414.1641,-20.2892,1000.9251);
- SetPlayerPos(id2, 1362.8082,-20.4927,1000.9219);
- SetPlayerInterior(id1, 1);
- SetPlayerInterior(id2, 1);
- SetPlayerHealth(id1, 100);
- SetPlayerHealth(id2, 100);
- SetPlayerArmour(id1, 100);
- SetPlayerArmour(id2, 100);
- GivePlayerWeapon(id1, 24, 999);
- GivePlayerWeapon(id2, 24, 999);
- GivePlayerWeapon(id1, 25, 999);
- GivePlayerWeapon(id2, 25, 999);
- TaNoX1[id1] =
- TaNoX1[id2] =
- Tendox1 = true;
- format(string, sizeof(string), "[One vs One]: {00FFFF}%s {FFFFFF}vs {00FFFF}%s", Nome(id1), Nome(id2));
- SendClientMessageToAll(COR_JEFF, string);
- TogglePlayerControllable(id1, 0);
- TogglePlayerControllable(id2, 0);
- DescongelarJeff();
- return 1;
- }
- Nome(playerid)
- {
- new nome[24];
- GetPlayerName(playerid, nome, 24);
- return nome;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement