[Ajuda] Preciso de Ajuda por favor
#1

Alguem me ajuda passar esse sistema como FS ?



// SISTEMA DE EVENTO INICIO

if(strcmp(cmd, "/eahjuda", true) == 0 || strcmp(cmd, "/eah", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_DBLUE,"~ Brasil Style Of Life ~");
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GREEN,"[Evento] /einiciar /eterminar /etrancar /edestrancar /eentrar /esair ");
SendClientMessage(playerid, COLOR_GREEN,"[Evento] /eplayers /econgelar /edescongelar /ecarro /earma /etirararma ");
SendClientMessage(playerid, COLOR_GREEN,"[Evento] /ecolete /ereparar /etrazer /eejetar /enos /esuspenar /evida ");
}
SendClientMessage(playerid, COLOR_DBLUE,"~ Brasil Style Of Life ~");
}
return 1;
}

if(strcmp(cmd, "/einiciar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
Evento = 1;
//BroadCast(TEAM_ADMIN_COLOR, "[Evento] Evento aberto pelo administrador!!");
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s abriu um evento, digite /eentrar para entrar no evento!", admnick);
SendClientMessageToAll(TEAM_ADMIN_COLOR, streventu);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/eterminar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
Evento = 0;
//
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
//
PlayerNoEvento[possiveis] = 0;
//
RemovePlayerFromVehicle(possiveis);
TogglePlayerControllable(possiveis, 1);
SetTimerEx("Spawnar", 3000, false, "i", possiveis);
//
}
//
BroadCast(TEAM_ADMIN_COLOR, "[Evento] Evento terminado pelo administrador!!");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/etrancar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
EventoTrancado = 1;
//BroadCast(TEAM_ADMIN_COLOR, "[Evento] Evento trancado pelo administrador!!");
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s trancou o evento, ninguйm mais poderб entrar.", admnick);
SendClientMessageToAll(TEAM_ADMIN_COLOR, streventu);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/edestrancar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
EventoTrancado = 0;
//BroadCast(TEAM_ADMIN_COLOR, "[Evento] Evento destrancado pelo administrador!!");
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s destrancou o evento, digite /eentrar para entrar no evento!", admnick);
SendClientMessageToAll(TEAM_ADMIN_COLOR, streventu);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/eentrar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_GREY," Vocк nгo pode participar do evento, pois nгo cumpriu sua pena ainda!");
return 1;
}
if (PlayerNoEvento[playerid] == 0 && (Evento == 1) && (EventoTrancado == 0))
{
PlayerNoEvento[playerid] = 1;
SendClientMessage(playerid, TEAM_ADMIN_COLOR, "[Evento] Vocк entrou no evento!");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/esair", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerNoEvento[playerid] == 1 && (Evento == 1))
{
PlayerNoEvento[playerid] = 0;
//
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SetTimerEx("Spawnar", 3000, false, "i", playerid);
//
SendClientMessage(playerid, TEAM_ADMIN_COLOR, "[Evento] Vocк saiu no evento!");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[Info] Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
if(strcmp(cmd, "/ecarro", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
new carro;
carro = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "Digite o id do carro!");
return 1;
}
if(carro < 400 || carro > 611)
{
SendClientMessage(playerid, COLOR_YELLOW, " O ID do veiculo digitado estб invalido! veiculos de 400 б 611");
return 1;
}
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
new Float:X = 0,Float:Y = 0,Float:Z = 0,Float:Angulo = 0;
GetPlayerPos(possiveis, X,Y,Z);
GetPlayerFacingAngle(playerid, Angulo);
Veiculos[VeiculosCriados++] = CreateVehicle(carro, X, Y, Z, 0, random(126), random(126), 60000);
LinkVehicleToInterior(Veiculos[VeiculosCriados-1], GetPlayerInterior(possiveis));
SetVehicleVirtualWorld(Veiculos[VeiculosCriados-1], GetPlayerVirtualWorld(possiveis));
PutPlayerInVehicle(possiveis, Veiculos[VeiculosCriados-1], 0);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s deu o veнculo ID %d aos jogadores do evento!", admnick,carro);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if (strcmp(cmd, "/eplayers", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "[Evento] Brasil Style Of Life Players no Evento.");
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
if(IsPlayerConnected(possiveis))
{
if(PlayerNoEvento[possiveis] == 1)
{
GetPlayerName(possiveis, sendername, sizeof(sendername));
format(string, 256, "Competidor: %s", sendername);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
}
}
}
}
return 1;
}
if(strcmp(cmd, "/enos", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
if(IsPlayerInAnyVehicle(possiveis))
{
AddVehicleComponent(GetPlayerVehicleID(possiveis), 1010);
}
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s colocou nitro em todos os veiculos do evento.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/ereparar", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
if(IsPlayerInAnyVehicle(possiveis))
{
RepairVehicle(GetPlayerVehicleID(possiveis));
}
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s concertou todos os veiculos do evento.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/esuspenar", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
if(IsPlayerInAnyVehicle(possiveis))
{
AddVehicleComponent(GetPlayerVehicleID(possiveis), 1087);
}
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s colocou suspenзгo em todos os veiculos do evento.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/eejetar", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
TogglePlayerControllable(possiveis, 1);
RemovePlayerFromVehicle(possiveis);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s ejetou todos do evento de seus veiculos.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/econgelar", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
TogglePlayerControllable(possiveis, false);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s congelou todos do evento.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/edescongelar", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
TogglePlayerControllable(possiveis, true);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s descongelou todos do evento.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/evida", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
new vida = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Digite a quantidade do HP!");
return 1;
}
if(vida < 0 || vida > 100)
{
return 1;
}
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
SetPlayerHealth(possiveis,vida);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s setou a vida de todos jogadores do evento para %d.", admnick,vida);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/ecolete", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
new colete = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Digite a quantidade do Colete!");
return 1;
}
if(colete < 0 || colete > 100)
{
return 1;
}
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
SetPlayerArmour(possiveis, colete);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s setou o colete de todos jogadores do evento para %d.", admnick,colete);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/etirararma", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
ResetPlayerWeapons(possiveis);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s desarmou todos do evento.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/etrazer", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
new Float:PX, Float:PY, Float:PZ;
GetPlayerPos(playerid,PX,PY,PZ);
SetPlayerInterior(possiveis,GetPlayerInterior(play erid));
ResetPlayerWeapons(possiveis);
//
if (GetPlayerState(possiveis) == 2)
{
new tmpcar = GetPlayerVehicleID(possiveis);
SetVehiclePos(tmpcar,PX,PY, PZ);
LinkVehicleToInterior(tmpcar, GetPlayerInterior(playerid));
}
else
{
SetPlayerPos(possiveis,PX,PY, PZ);
}
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s trouxe todos do evento atй ele.", admnick);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
if(strcmp(cmd, "/earma", true) == 0 && (Evento == 1) && PlayerInfo[playerid][pAdmin] >= 3)
{
new gun;
new ammo;
tmp = strtok(cmdtext, idx);
gun = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Digite o id da arma e a muniзгo!");
return 1;
}
tmp = strtok(cmdtext, idx);
ammo = strval(tmp);
/*if(ammo < 1||ammo > 1000)
{
return 1;
}*/
for(new possiveis = 0; possiveis < MAX_PLAYERS; possiveis++) if(PlayerNoEvento[possiveis] == 1)
{
GivePlayerWeapon(possiveis, gun, ammo);
}
GetPlayerName(playerid,admnick, 24);
format(streventu, 128, "[Evento] O administrador %s deu arma %d muniзгo %d aos jogadores do evento!", admnick,gun,ammo);
SendClientMessageToAll(COLOR_YELLOW, streventu);
return 1;
}
Reply


Messages In This Thread
Preciso de Ajuda por favor - by iFakew - 17.11.2013, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)