Pessoal, alguém pode me ajudar? Tenho esse FS aqui que baixei do Youtube, porém tenho o seguinte problema: o comando "/editarconse" pode ser feito por qualquer usuário e eu queria mudar isso, setar para apenas admins utilizarem o comando, se alguém puder me ajudar, agradeço. Já tentei adaptar os comandos restrito a admins de outras partes da GM mas não consegui.
O código:
new SvC_SlotsBy[] ={1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000,18000,19000};
new bool:SvC_BuySlotOnOff = false; //TRUE = ATIVADO/FALASE = DESATIVADO [SISTEMA DE COMPRAR SLOTS PARA PODER COMPRAR OS VEICULOS NA CONSE]
new SVCarPLAYER[QntSlotCar][MAX_PLAYERS],SvCarCOR[QntSlotCar][MAX_PLAYERS],VisuCAr[MAX_PLAYERS],ConseDoVis[MAX_PLAYERS];
new SVC_Localizar[MAX_PLAYERS],SvSelcCar[MAX_PLAYERS],pAceitar[MAX_PLAYERS][3],pTrancarCAR[MAX_VEHICLES],SvC_UpSlot[MAX_PLAYERS],
TrValorVehNormal[SvMaxCarsNormal][2],TrValorVehMotos[SvMaxCarsMoto][2],TrValorVehLUXO[SvMaxCarsLuxo][2],TrConfConse1[MAX_PLAYERS],TrConfConse2[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
SVC_Localizar[playerid] = 0;
ConseDoVis[playerid] = 0;
for (new i = 0; i < QntSlotCar; i++)
{
DestroyVehicle(SVCarPLAYER[i][playerid]);
SVCarPLAYER[i][playerid] = 0;
}
new Svcpath[50];
Svcpath = SaveCarNomePlay(playerid);
if(!DOF2_FileExists(Svcpath)) DOF2_CreateFile(Svcpath);
DOF2_SetInt(Svcpath,"SvC_UpSlot",SvC_UpSlot[playerid]);
SvC_UpSlot[playerid] = 0;
return 1;
}
SaveCarNomePlay(playerid){
new name[24], full[50];
GetPlayerName(playerid,name,sizeof(name));
format(full,sizeof(full),"%s/%s.txt",SvcPATH,name);
return full;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Diag_CentralConse){
if(response){
new StrScv[128];
if(listitem == 0){
if(IsPlayerInRangeOfPoint(playerid,2.0,2134.5073,-1155.5154,24.2175)){
new ScStrG[3500];
//xt strcat(ScStrG, "{666699}Modelo\t{666699}Valor\n{FFFFFF}");
for(new i = 0; i < sizeof(TrValorVehNormal); i++){
if(TrValorVehNormal[i][1] >= 400){
format(StrScv, sizeof(StrScv), "%s(%i)\tR$%i\t%s\n",SvCNomeCars[TrValorVehNormal[i][1]-400],TrValorVehNormal[i][1],TrValorVehNormal[i][0]);
strcat(ScStrG, StrScv);
}else break;
}
return ShowPlayerDialog(playerid, Dial_conseTX, DIALOG_STYLE_LIST, "{666699}Concessionária de veiculos", ScStrG, "Comprar", "Voltar");
}else if(IsPlayerInRangeOfPoint(playerid,2.0,2137.8337,-1155.5135,24.2175)){
new ScStrG[3500];
//xt strcat(ScStrG, "{666699}Modelo\t{666699}Valor\n{FFFFFF}");
for(new i = 0; i < sizeof(TrValorVehMotos); i++){
if(TrValorVehMotos[i][1] >= 400){
format(StrScv, sizeof(StrScv), "%s(%i)\tR$%i\t%s\n",SvCNomeCars[TrValorVehMotos[i][1]-400],TrValorVehMotos[i][1],TrValorVehMotos[i][0]);
strcat(ScStrG, StrScv);
}else break;
}
return ShowPlayerDialog(playerid, Dial_conseTX, DIALOG_STYLE_LIST, "{666699}Concessionária de veiculos", ScStrG, "Comprar", "Voltar");
}else if(IsPlayerInRangeOfPoint(playerid,2.0,-1968.4557,294.0216,35.1719)){
new ScStrG[3500];
//xt strcat(ScStrG, "{666699}Modelo\t{666699}Valor\n{FFFFFF}");
for(new i = 0; i < sizeof(TrValorVehLUXO); i++){
if(TrValorVehLUXO[i][1] >= 400){
format(StrScv, sizeof(StrScv), "%s(%i)\tR$%i\n",SvCNomeCars[TrValorVehLUXO[i][1]-400],TrValorVehLUXO[i][1],TrValorVehLUXO[i][0]);
strcat(ScStrG, StrScv);
}else break;
}
return ShowPlayerDialog(playerid, Dial_conseTX, DIALOG_STYLE_LIST, "{666699}Concessionária de veiculos", ScStrG, "Comprar", "Voltar");
}else SendClientMessage(playerid, 0xFF0000FF, "Você não está em uma conse!");
}else if(listitem == 1){
if(IsPlayerInRangeOfPoint(playerid,2.0,2134.5073,-1155.5154,24.2175)){
new ScStrG[3500];
//xt strcat(ScStrG, "{666699}Modelo\t{666699}Valor\n{FFFFFF}");
for(new i = 0; i < sizeof(TrValorVehNormal); i++){
if(TrValorVehNormal[i][1] >= 400){
format(StrScv, sizeof(StrScv), "%s(%i)\tR$%i\t%s\n",SvCNomeCars[TrValorVehNormal[i][1]-400],TrValorVehNormal[i][1],TrValorVehNormal[i][0]);
strcat(ScStrG, StrScv);
}else break;
}
return ShowPlayerDialog(playerid, Diag_VerCarros, DIALOG_STYLE_LIST, "{666699}Concessionária de veiculos [Visualizar]", ScStrG, "Ver", "Voltar");
}else if(IsPlayerInRangeOfPoint(playerid,2.0,2137.8337,-1155.5135,24.2175)){
new ScStrG[3500];
//xt strcat(ScStrG, "{666699}Modelo\t{666699}Valor\n{FFFFFF}");
for(new i = 0; i < sizeof(TrValorVehMotos); i++){
if(TrValorVehMotos[i][1] >= 400){
format(StrScv, sizeof(StrScv), "%s(%i)\tR$%i\t%s\n",SvCNomeCars[TrValorVehMotos[i][1]-400],TrValorVehMotos[i][1],TrValorVehMotos[i][0]);
strcat(ScStrG, StrScv);
}else break;
}
return ShowPlayerDialog(playerid, Diag_VerCarros, DIALOG_STYLE_LIST, "{666699}Concessionária de veiculos [Visualizar]", ScStrG, "Ver", "Voltar");
}else if(IsPlayerInRangeOfPoint(playerid,2.0,-1968.4557,294.0216,35.1719)){
new ScStrG[3500];
//xt strcat(ScStrG, "{666699}Modelo\t{666699}Valor\n{FFFFFF}");
for(new i = 0; i < sizeof(TrValorVehLUXO); i++){
if(TrValorVehLUXO[i][1] >= 400){
format(StrScv, sizeof(StrScv), "%s(%i)\tR$%i\n",SvCNomeCars[TrValorVehLUXO[i][1]-400],TrValorVehLUXO[i][1],TrValorVehLUXO[i][0]);
strcat(ScStrG, StrScv);
}else break;
}
return ShowPlayerDialog(playerid, Diag_VerCarros, DIALOG_STYLE_LIST, "{666699}Concessionária de veiculos [Visualizar]", ScStrG, "Ver", "Volta");
}else SendClientMessage(playerid, 0xFF0000FF, "Você não está em uma conse!");
}
}
return 1;
}
if(dialogid == Diag_VerCarros){
if(response){
new StrSv[128];
if(IsPlayerInRangeOfPoint(playerid,2.0,2134.5073,-1155.5154,24.2175)){
ConseDoVis[playerid] = 1;
VisuCAr[playerid] = AddStaticVehicleEx(TrValorVehNormal[listitem][1],2119.8101,-1198.1276,25.4969,17.9203,1,1,-1);
format(StrSv, sizeof(StrSv), "Você está visualizando o veiculo %s(%i) por 10 Seg ou saia do carro!",SvCNomeCars[TrValorVehNormal[listitem][1]-400],TrValorVehLUXO[listitem][1]);
}else if(IsPlayerInRangeOfPoint(playerid,2.0,2137.8337,-1155.5135,24.2175)){
ConseDoVis[playerid] = 2;
VisuCAr[playerid] = AddStaticVehicleEx(TrValorVehMotos[listitem][1],2119.8101,-1198.1276,25.4969,17.9203,1,1,-1);
format(StrSv, sizeof(StrSv), "Você está visualizando o veiculo %s(%i) por 10 Seg ou saia do carro!",SvCNomeCars[TrValorVehMotos[listitem][1]-400],TrValorVehLUXO[listitem][1]);
}else if(IsPlayerInRangeOfPoint(playerid,2.0,-1968.4557,294.0216,35.1719)){
ConseDoVis[playerid] = 3;
VisuCAr[playerid] = AddStaticVehicleEx(TrValorVehLUXO[listitem][1],2119.8101,-1198.1276,25.4969,17.9203,1,1,-1);
format(StrSv, sizeof(StrSv), "Você está visualizando o veiculo %s(%i) por 10 Seg ou saia do carro!",SvCNomeCars[TrValorVehLUXO[listitem][1]-400],TrValorVehLUXO[listitem][1]);
}
SetVehicleVirtualWorld(VisuCAr[playerid], playerid+1);
SetPlayerVirtualWorld(playerid, playerid+1);
PutPlayerInVehicle(playerid, VisuCAr[playerid], 1);
SetTimerEx("VisuCarFx", 10000, false,"i",playerid);
SendClientMessage(playerid, 0x666699FF, StrSv);
}else SvcShowDialgC(playerid);
return 1;
}
if(dialogid == Diag_ConfigCs1){
if(response){
TrConfConse1[playerid] = listitem;
new ScStrG[3000],StrSv[128];
//rt strcat(ScStrG, "{666699}Slot\t{666699}Veiculo\t{666699}Valor\n");
if(listitem == 0){
for(new i = 0; i < sizeof(TrValorVehNormal); i++){
if(TrValorVehNormal[i][1] >= 400)
format(StrSv, sizeof(StrSv), "%i\t%s(%i)\tR$%i\n",i,SvCNomeCars[TrValorVehNormal[i][1]-400],TrValorVehNormal[i][1],TrValorVehNormal[i][0]);
else
format(StrSv, sizeof(StrSv), "%i\tNenhum\n",i);
strcat(ScStrG, StrSv);
}
}
else if(listitem == 1){
for(new i = 0; i < SvMaxCarsMoto; i++){
if(TrValorVehMotos[i][1] >= 400)
format(StrSv, sizeof(StrSv), "%i\t%s(%i)\tR$%i\n",i,SvCNomeCars[TrValorVehMotos[i][1]-400],TrValorVehMotos[i][1],TrValorVehMotos[i][0]);
else
format(StrSv, sizeof(StrSv), "%i\tNenhum\n",i);
strcat(ScStrG, StrSv);
}
}
else if(listitem == 2){
for(new i = 0; i < SvMaxCarsLuxo; i++){
if(TrValorVehLUXO[i][1] >= 400)
format(StrSv, sizeof(StrSv), "%i\t%s(%i)\tR$%i\n",i,SvCNomeCars[TrValorVehLUXO[i][1]-400],TrValorVehLUXO[i][1],TrValorVehLUXO[i][0]);
else
format(StrSv, sizeof(StrSv), "%i\tNenhum\n",i);
strcat(ScStrG, StrSv);
}
}
return ShowPlayerDialog(playerid, Diag_ConfigCs2, DIALOG_STYLE_LIST, "{666699}Configurar Concessionária", ScStrG, "proximo", "Cancelar");
}
return 1;
}
if(dialogid == Diag_ConfigCs2){
if(response){
TrConfConse2[playerid] = listitem;
new ScStrG[500];
strcat(ScStrG, "{666699}Digite: {FFFFFF}[Modelo][Valor]\n");
strcat(ScStrG, "{666699}Modelos Diponiveis: [400~611]\n");
strcat(ScStrG, "{666699}Digite {FFFFFF}Modelo: [0] {666699}para limpar um Slot\n");
return ShowPlayerDialog(playerid, Diag_ConfigCs3, DIALOG_STYLE_INPUT, "{666699}Configurar Concessionária", ScStrG, "proximo", "Cancelar");
}
return 1;
}
if(dialogid == Diag_ConfigCs3){
if(response){
new xModelo, xValor, xSlot = TrConfConse2[playerid],StrSv[128],StrPath[64];
if(sscanf(inputtext, "ii", xModelo, xValor)) return SendClientMessage(playerid, 0xFF0000FF, "Digite: [Modelo][Valor]");
if(xModelo < 400 || xModelo > 611 && xModelo != 0) return SendClientMessage(playerid, 0xFF0000FF, "Modelos validos: [400~611] /ou Modelo: 0 para remover limpar o slot");
if(TrConfConse1[playerid] == 0){
if(xModelo != 0) format(StrSv, sizeof(StrSv), "Você adiciou o veiculo %s(%i) por R$%i na conse de Carros Populares! [Slot:%i]",SvCNomeCars[xModelo-400],xModelo,xValor,xSlot);
else format(StrSv, sizeof(StrSv), "Você limpou o Slot: %i!",xSlot);
TrValorVehNormal[xSlot][1] = xModelo;
TrValorVehNormal[xSlot][0] = xValor;
SendClientMessage(playerid, 0xFFFFFFFF, StrSv);
format(StrPath,sizeof(StrPath),"%s/CarPopular.ini",SvcPATH);
}else if(TrConfConse1[playerid] == 1){
if(xModelo != 0) format(StrSv, sizeof(StrSv), "Você adiciou o veiculo %s(%i) por R$%i na conse de Motos! [Slot:%i]",SvCNomeCars[xModelo-400],xModelo,xValor,xSlot);
else format(StrSv, sizeof(StrSv), "Você limpou o Slot: %i!",xSlot);
TrValorVehMotos[xSlot][1] = xModelo;
TrValorVehMotos[xSlot][0] = xValor;
SendClientMessage(playerid, 0xFFFFFFFF, StrSv);
format(StrPath,sizeof(StrPath),"%s/CarMotos.ini",SvcPATH);
}else if(TrConfConse1[playerid] == 2){
if(xModelo != 0) format(StrSv, sizeof(StrSv), "Você adiciou o veiculo %s(%i) por R$%i na conse de Carros LUXO! [Slot:%i]",SvCNomeCars[xModelo-400],xModelo,xValor,xSlot);
else format(StrSv, sizeof(StrSv), "Você limpou o Slot: %i!",xSlot);
TrValorVehLUXO[xSlot][1] = xModelo;
TrValorVehLUXO[xSlot][0] = xValor;
SendClientMessage(playerid, 0xFFFFFFFF, StrSv);
format(StrPath,sizeof(StrPath),"%s/CarLUXO.ini",SvcPATH);
}
if(!DOF2_FileExists(StrPath)) DOF2_CreateFile(StrPath);
format(StrSv, sizeof(StrSv), "Modelo_%i",xSlot);
DOF2_SetInt(StrPath,StrSv,xModelo);
format(StrSv, sizeof(StrSv), "Valor_%i",xSlot);
DOF2_SetInt(StrPath,StrSv,xValor);
DOF2_SaveFile();
}
return 1;
}
if(dialogid == Diag_Menu_Car){
if(response){
if(listitem == 0){
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Voce nao esta em um veiculo!");
new path[50],StrCAR[24], FtrMV[64],StrMV[1000];
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
if(SVCarPLAYER[i][playerid] != 0){
new DefCarSlot = GetVehicleModel(SVCarPLAYER[i][playerid]);
if(DefCarSlot >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i)\n",i, SvCNomeCars[DefCarSlot-400],DefCarSlot);
strcat(StrMV, FtrMV);
}
}else{
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i)\n",i, SvCNomeCars[SCCarid-400],SCCarid);
}else format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - Nenhum\n",i);
strcat(StrMV, FtrMV);
}
}
return ShowPlayerDialog(playerid, NIDConseCarsC1, DIALOG_STYLE_LIST, "{666699}Estacionar Veiculo", StrMV, "Proximo", "Voltar");
}
else if(listitem == 1){
new path[50],StrCAR[24], FtrMV[64],StrMV[1000];
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i)\n",i, SvCNomeCars[SCCarid-400],SCCarid);
}else
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - Nenhum\n",i);
strcat(StrMV, FtrMV);
}
return ShowPlayerDialog(playerid, NIDConseCarsC3, DIALOG_STYLE_LIST, "{666699}Spawnar Veiculo", StrMV, "Proximo", "Voltar");
}
else if(listitem == 2){
new path[50],StrCAR[24], FtrMV[64],StrMV[1000];
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i)\n",i, SvCNomeCars[SCCarid-400],SCCarid);
}else
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - Nenhum\n",i);
strcat(StrMV, FtrMV);
}
return ShowPlayerDialog(playerid, NIDConseCarsC2, DIALOG_STYLE_LIST, "{666699}Localizar Veiculo", StrMV, "Proximo", "Voltar");
}
else if(listitem == 3){
new path[50],StrCAR[24], FtrMV[64],StrMV[1000];
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i)\n",i, SvCNomeCars[SCCarid-400],SCCarid);
}else
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - Nenhum\n",i);
strcat(StrMV, FtrMV);
}
return ShowPlayerDialog(playerid, NIDConseCarsC5, DIALOG_STYLE_LIST, "{666699}Remover Veiculo", StrMV, "Proximo", "Voltar");
}
else if(listitem == 4){
new path[50],StrCAR[24], FtrMV[64],StrMV[1000];
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i) {33CC33}R$%i\n",i, SvCNomeCars[SCCarid-400],SCCarid, floatround(yChckVlrCar(SCCarid)));
}else
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - Nenhum\n",i);
strcat(StrMV, FtrMV);
}
return ShowPlayerDialog(playerid, NIDConseCSell, DIALOG_STYLE_LIST, "{666699}Vender Veiculo", StrMV, "Proximo", "Voltar");
}
else if(listitem == 5){
new path[50],StrCAR[24], FtrMV[64],StrMV[1000];
strcat(StrMV, "{00FF00}Digite o numero do veiculo para ser Vendio para outro player\n");
strcat(StrMV, "{00FF00}Digite: [playerid][Slot][Valor]\n");
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid >= 400){
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - %s(%i) {33CC33}FIPE: R$%i\n",i, SvCNomeCars[SCCarid-400],SCCarid, floatround(yChckVlrCar(SCCarid)));
}else
format(FtrMV, sizeof(FtrMV), "{666699}[%i]{FFFFFF} - Nenhum\n",i);
strcat(StrMV, FtrMV);
}
ShowPlayerDialog(playerid, SellCarPlyPly, DIALOG_STYLE_INPUT, "{666699}Vender Veiculo para outro jogador", StrMV, "Proximo", "Voltar");
return 1;
}
else if(listitem == 6){
new xValor = pAceitar[playerid][0], xPlayer = pAceitar[playerid][1], xSlot = pAceitar[playerid][2], PegarNome[32], ySlot = -1,StrScv[128];
if(pAceitar[playerid][0] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Voce nao tem nenhuma solicitação de venda de veiculos!");
if(GetPlayerMoney(playerid) < xValor) return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro suficiente!");
if(SVCarPLAYER[xSlot][xPlayer] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "O Veiculo do jogador nao esta Spawnado!");
new path[50],StrCAR[24];
path = SaveCarNomePlay(xPlayer);
format(StrCAR, sizeof(StrCAR), "CarID_%i", xSlot);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid < 400) return SendClientMessage(playerid, 0xFFFFFFFF, "Este jogador nao possui mais este Veiculo!");
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
if(DOF2_GetInt(path,StrCAR) == 0){ ySlot = i; break; }
}
if(ySlot == -1) return SendClientMessage(playerid, 0xFF0000FF, "{666699}Voce nao tem Slots suficiente!");
if(SvC_BuySlotOnOff == true) if(ySlot >= SvC_UpSlot[playerid]) return SendClientMessage(playerid, 0xFF0000FF, "Você não possui Slots Sufucientes!");
GivePlayerMoney(xPlayer,xValor);
GivePlayerMoney(playerid,-xValor);
GetPlayerName(xPlayer, PegarNome, sizeof(PegarNome));
format(StrScv, sizeof(StrScv), "Você comprou o veiculo (%s) do %s(%i) por R$%i", SvCNomeCars[SCCarid-400],PegarNome,xPlayer,xValor);
SendClientMessage(playerid, 0xFFFFFFFF, StrScv);
GetPlayerName(playerid, PegarNome, sizeof(PegarNome));
format(StrScv, sizeof(StrScv), "Jogador %s(%i) comprou o seu veiculo (%s) por R$%i", SvCNomeCars[SCCarid-400],PegarNome,playerid,xValor);
SendClientMessage(xPlayer, 0xFFFFFFFF, StrScv);
SVCarPLAYER[ySlot][playerid] = SVCarPLAYER[xSlot][xPlayer];
path = SaveCarNomePlay(xPlayer);
format(StrCAR, sizeof(StrCAR), "CarID_%i", xSlot);
DOF2_SetInt(path,StrCAR,0);
SVCarPLAYER[xSlot][xPlayer] = 0;
pAceitar[playerid][0] = 0;//VALOR
pAceitar[playerid][1] = 0;//PLAYERID
pAceitar[playerid][2] = 0;//SLOT
DOF2_SaveFile();
return 1;
}
else if(listitem == 7){
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Você não está em um carro!");
if(pTrancarCAR[GetPlayerVehicleID(playerid)] > 0) return SendClientMessage(playerid, 0xFF0000FF, "Este veiculo já esta trancado!");
pTrancarCAR[GetPlayerVehicleID(playerid)] = playerid+1;
SendClientMessage(playerid, 0xFFFFFFFF, "Veiculo trancado!");
}
else if(listitem == 8){
new veiculo = -1,Float:PosCar[3];
for(new i = 0; i < 2000; i++){
GetVehiclePos(i,PosCar[0],PosCar[1],PosCar[2]);
if(IsPlayerInRangeOfPoint(playerid,3.0,PosCar[0],PosCar[1],PosCar[2])){ veiculo = i;break;}
}
if(veiculo == -1) return SendClientMessage(playerid, 0xFF0000FF, "Voce nao esta proximo a nenhum veiculo!");
if(pTrancarCAR[veiculo] == 0) return SendClientMessage(playerid, 0xFF0000FF, "Este veiculo nao esta trancado!");
if(pTrancarCAR[veiculo]-1 != playerid) return SendClientMessage(playerid, 0xFF0000FF, "Você não possui as chaves deste veiculo!");
pTrancarCAR[veiculo] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Veiculo Destrancado!");
}else if(listitem == 9){
new StrMV[1000],StrCAR[128];
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "{FFFFFF}Slot:%i\t{33CC33}R$%i\t%s\n", i,SvC_SlotsBy[i], SvC_UpSlot[playerid] <= i ? ("{E74C3C}[NÃO COMPRADO]"):("{2ECC71}[COMPRADO]"));
strcat(StrMV, StrCAR);
}
return ShowPlayerDialog(playerid, Diag_BuySlot, DIALOG_STYLE_LIST, "{FF0000}[Upgrade Slots]", StrMV, "Proximo", "Cancelar");
}
else SendClientMessage(playerid, 0xFF0000FF, "Opcao Invalida!");
return 1;
}
return 1;
}
if(dialogid == Diag_BuySlot){//
if(!response) return 1;
new StrScv[128];
if(listitem != 0) if(SvC_UpSlot[playerid] <= listitem-1) return SendClientMessage(playerid, 0xFF0000FF, "Você não comprou a capacidade anterior!");
if(SvC_UpSlot[playerid] > listitem) return SendClientMessage(playerid, 0xFF0000FF, "Você já comprou esta capacidade!");
if(GetPlayerMoney(playerid) < SvC_SlotsBy[listitem]) return SendClientMessage(playerid, 0xFF0000FF, "Você não tem dinheiro suficiente para comprar este Upgrade!");
GivePlayerMoney(playerid,-SvC_SlotsBy[listitem]);
SvC_UpSlot[playerid] = listitem+1;
format(StrScv, sizeof(StrScv), "Você comprou o Slot %i por {33CC33}R$%i", listitem,SvC_SlotsBy[listitem]);
SendClientMessage(playerid, 0xFFFFFFFF, StrScv);
return 1;
}
if(dialogid == NIDConseCarsC5){
if(response){
new SlcCAR = listitem, StrCAR[128],Float:PosV[3];
if(SlcCAR >= 5) return SendClientMessage(playerid, 0xFF0000AA, "{6495ED}Voce digitou um numero invalido!");
if(SVCarPLAYER[SlcCAR][playerid] == 0) return SendClientMessage(playerid, 0xFF0000FF, "{6495ED}Voce nao pegou seu veiculo.");
if(AlguemNoCarro(SVCarPLAYER[SlcCAR][playerid]) == 1) return SendClientMessage(playerid, 0xFF0000FF,"Tem alguem dentro do seu veiculo!");
GetVehiclePos(SVCarPLAYER[SlcCAR][playerid],PosV[0],PosV[1],PosV[2]);
if(!IsPlayerInRangeOfPoint(playerid,20.0,PosV[0],PosV[1],PosV[2])) return SendClientMessage(playerid, 0xFF0000AA, "Voce nao esta perto o suficiente do seu veiculo!");
DestroyVehicle(SVCarPLAYER[SlcCAR][playerid]);
format(StrCAR, sizeof(StrCAR), "Voce removeu seu veiuclo {666699}(%i)", SlcCAR);
SendClientMessage(playerid, 0xFFFFFFFF, StrCAR);
SVCarPLAYER[SlcCAR][playerid] = 0;
}else SvcShwDiagMenu(playerid);
TogglePlayerControllable(playerid, true);
return 1;
}
if(dialogid == NIDConseCarsC3){
if(response){
new SlcCAR = listitem;
if(SlcCAR >= 5) return SendClientMessage(playerid, 0xFF0000FF, "Voce digitou um numero invalido!");
if(SVCarPLAYER[SlcCAR][playerid] != 0) return SendClientMessage(playerid, 0xFF0000FF, "Voce ja pegou o veiculo deste slot!");
new path[50],StrCAR[64], SCCarid, Float:PosSC[4];
path = SaveCarNomePlay(playerid);
format(StrCAR, sizeof(StrCAR), "CarID_%i", SlcCAR);
SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid < 400) return SendClientMessage(playerid, 0xFF0000FF, "Não possui nenhum veiculo neste Slot!");
format(StrCAR, sizeof(StrCAR), "PosX_%i", SlcCAR);
PosSC[0] = DOF2_GetFloat(path,StrCAR);
format(StrCAR, sizeof(StrCAR), "PosY_%i", SlcCAR);
PosSC[1] = DOF2_GetFloat(path,StrCAR);
format(StrCAR, sizeof(StrCAR), "PosZ_%i", SlcCAR);
PosSC[2] = DOF2_GetFloat(path,StrCAR);
format(StrCAR, sizeof(StrCAR), "PosA_%i", SlcCAR);
PosSC[3] = DOF2_GetFloat(path,StrCAR);
format(StrCAR, sizeof(StrCAR), "Cor_%i", SlcCAR);
SvCarCOR[SlcCAR][playerid] = DOF2_GetInt(path,StrCAR);
DestroyVehicle(SVCarPLAYER[SlcCAR][playerid]);
SVCarPLAYER[SlcCAR][playerid] = AddStaticVehicleEx(SCCarid,PosSC[0],PosSC[1],PosSC[2],PosSC[3],SvCarCOR[SlcCAR][playerid],SvCarCOR[SlcCAR][playerid],-1);
SetVehicleHealth(SVCarPLAYER[SlcCAR][playerid], 1000.0);
SendClientMessage(playerid, 0xFFFFFFFF, "Seu veiculo esta no local estacionado.");
}else SvcShwDiagMenu(playerid);
TogglePlayerControllable(playerid, true);
return 1;
}
if(dialogid == NIDConseCarsC2){
if(response){
new SlcCAR = listitem;
if(SlcCAR >= QntSlotCar) return SendClientMessage(playerid, 0xFF0000FF, "Voce digitou um numero invalido!");
if(SVCarPLAYER[SlcCAR][playerid] == 0) return SendClientMessage(playerid, 0xFF0000FF, "Voce nao pegou seu veiculo.");
new Float:PosV[3],StrCAR[128];
GetVehiclePos(SVCarPLAYER[SlcCAR][playerid],PosV[0],PosV[1],PosV[2]);
if(floatround(PosV[0]) == 0 && floatround(PosV[1]) == 0){
SVCarPLAYER[SlcCAR][playerid] = 0;
format(StrCAR, sizeof(StrCAR), "Seu veiculo {666699}(%i){FFFFFF} foi Sincronizado! Pegue novamente", SlcCAR);
SendClientMessage(playerid, 0xFFFFFFFF, StrCAR);
return 1;
}
SetPlayerCheckpoint(playerid, PosV[0],PosV[1],PosV[2], 6.0);
format(StrCAR, sizeof(StrCAR), "Voce localizou o seu veiculo {666699}(%i)", SlcCAR);
SendClientMessage(playerid, 0xFFFFFFFF, StrCAR);
SVC_Localizar[playerid] = 1;
}else SvcShwDiagMenu(playerid);
TogglePlayerControllable(playerid, true);
return 1;
}
if(dialogid == NIDConseCarsC1){
if(response){
new SlcCAR = listitem;
new path[50],StrCAR[64], SCCarid, Float:PosSC[4];
SCCarid = GetPlayerVehicleID(playerid);
if(SCCarid != SVCarPLAYER[SlcCAR][playerid]) return SendClientMessage(playerid, 0xFF0000FF, "Este carro nao e seu, ou nao foi comprado!");
path = SaveCarNomePlay(playerid);
if(!DOF2_FileExists(path)) DOF2_CreateFile(path);
GetVehiclePos(SCCarid, PosSC[0],PosSC[1],PosSC[2]);
GetVehicleZAngle(SCCarid, PosSC[3]);
format(StrCAR, sizeof(StrCAR), "CarID_%i", SlcCAR);
DOF2_SetInt(path,StrCAR,GetVehicleModel(GetPlayerVehicleID(playerid)));
format(StrCAR, sizeof(StrCAR), "PosX_%i", SlcCAR);
DOF2_SetFloat(path,StrCAR,PosSC[0]);
format(StrCAR, sizeof(StrCAR), "PosY_%i", SlcCAR);
DOF2_SetFloat(path,StrCAR,PosSC[1]);
format(StrCAR, sizeof(StrCAR), "PosZ_%i", SlcCAR);
DOF2_SetFloat(path,StrCAR,PosSC[2]);
format(StrCAR, sizeof(StrCAR), "PosA_%i", SlcCAR);
DOF2_SetFloat(path,StrCAR,PosSC[3]);
format(StrCAR, sizeof(StrCAR), "Cor_%i", SlcCAR);
DOF2_SetInt(path,StrCAR,SvCarCOR[SlcCAR][playerid]);
DOF2_SaveFile();
SendClientMessage(playerid, 0xFF0000FF, "voce estacionou seu carro aqui!");
}else SvcShwDiagMenu(playerid);
return 1;
}
if(dialogid == NIDConseCSell){
if(response){
new SlcCAR = listitem,path[50],StrCAR[64],StrMsg[128],pModelo,pValor;
path = SaveCarNomePlay(playerid);
format(StrCAR, sizeof(StrCAR), "CarID_%i", SlcCAR);
pModelo = DOF2_GetInt(path,StrCAR);
if(pModelo < 400) return SendClientMessage(playerid, 0xFF0000FF, "Não possui nenhum veiculo neste Slot!");
pValor = floatround(yChckVlrCar(pModelo));
DOF2_SetInt(path,StrCAR,0);
format(StrMsg, sizeof(StrMsg), "Voce vendeu o veiculo {666699}%s{FFFFFF} por {33CC33}R$%i", SvCNomeCars[pModelo-400],pValor);
SendClientMessage(playerid,0xFFFFFFFF,StrMsg);
GivePlayerMoney(playerid,pValor);
DestroyVehicle(SVCarPLAYER[SlcCAR][playerid]);
SVCarPLAYER[SlcCAR][playerid] = 0;
DOF2_SaveFile();
}else SvcShwDiagMenu(playerid);
return 1;
}
if(dialogid == NIDConseCor){
if(response){
new StrScv[128],StrCAR[64],path[50],Slot = -1,DefCar = SvSelcCar[playerid], pCor = SvC_InfCor[listitem][0];//
path = SaveCarNomePlay(playerid);
for(new i = 0; i < QntSlotCar; i++){
format(StrCAR, sizeof(StrCAR), "CarID_%i", i);
if(DOF2_GetInt(path,StrCAR) == 0){ Slot = i; break; }
}
if(Slot == -1) return SendClientMessage(playerid, 0xFF0000FF, "Voce nao tem Slots suficiente!");
if(SvC_BuySlotOnOff == true) if(Slot >= SvC_UpSlot[playerid]) return SendClientMessage(playerid, 0xFF0000FF, "Você não possui Slots Sufucientes!");
if(pCor < 0 || pCor > 255) return SendClientMessage(playerid, 0xFF0000FF, "Use cores de 0~255!");
if(IsPlayerInRangeOfPoint(playerid,2.0,2134.5073,-1155.5154,24.2175)){//TrValorVehNormal
if(GetPlayerMoney(playerid) < TrValorVehNormal[DefCar][0]) return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro suficiente!");
if(TrValorVehNormal[DefCar][1] < 400) return SendClientMessage(playerid, 0xFFFFFFFF, "Não possui nenhum veiculo neste Slot!");
new XcAlr = random(sizeof(SvSpwCarPopular));
DestroyVehicle(SVCarPLAYER[Slot][playerid]);
GivePlayerMoney(playerid,-TrValorVehNormal[DefCar][0]);
SVCarPLAYER[Slot][playerid] = AddStaticVehicleEx(TrValorVehNormal[DefCar][1],SvSpwCarPopular[XcAlr][0],SvSpwCarPopular[XcAlr][1],SvSpwCarPopular[XcAlr][2]+2.0,SvSpwCarPopular[XcAlr][3],pCor,pCor,-1);
format(StrScv, sizeof(StrScv), "Voce comprou {666699}%s(%i){FFFFFF} por {33CC33}R$%i!",SvCNomeCars[TrValorVehNormal[DefCar][1]-400],TrValorVehNormal[DefCar][1],TrValorVehNormal[DefCar][0]);
}else if(IsPlayerInRangeOfPoint(playerid,2.0,2137.8337,-1155.5135,24.2175)){//TrValorVehMotos
if(GetPlayerMoney(playerid) < TrValorVehMotos[DefCar][0]) return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro suficiente!");
if(TrValorVehMotos[DefCar][1] < 400) return SendClientMessage(playerid, 0xFFFFFFFF, "Não possui nenhum veiculo neste Slot!");
new XcAlr = random(sizeof(SvSpwCarMOtos));
DestroyVehicle(SVCarPLAYER[Slot][playerid]);
GivePlayerMoney(playerid,-TrValorVehMotos[DefCar][0]);
SVCarPLAYER[Slot][playerid] = AddStaticVehicleEx(TrValorVehMotos[DefCar][1],SvSpwCarMOtos[XcAlr][0],SvSpwCarMOtos[XcAlr][1],SvSpwCarMOtos[XcAlr][2]+2.0,SvSpwCarMOtos[XcAlr][3],pCor,pCor,-1);
format(StrScv, sizeof(StrScv), "Voce comprou {666699}%s(%i){FFFFFF} por {33CC33}R$%i!",SvCNomeCars[TrValorVehMotos[DefCar][1]-400],TrValorVehMotos[DefCar][1],TrValorVehMotos[DefCar][0]);
}else if(IsPlayerInRangeOfPoint(playerid,2.0,-1968.4557,294.0216,35.1719)){//TrValorVehLUXO
if(GetPlayerMoney(playerid) < TrValorVehLUXO[DefCar][0]) return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro suficiente!");
if(TrValorVehLUXO[DefCar][1] < 400) return SendClientMessage(playerid, 0xFFFFFFFF, "Não possui nenhum veiculo neste Slot!");
new XcAlr = random(sizeof(SvSpwCarLuxo));
DestroyVehicle(SVCarPLAYER[Slot][playerid]);
GivePlayerMoney(playerid,-TrValorVehLUXO[DefCar][0]);
SVCarPLAYER[Slot][playerid] = AddStaticVehicleEx(TrValorVehLUXO[DefCar][1],SvSpwCarLuxo[XcAlr][0],SvSpwCarLuxo[XcAlr][1],SvSpwCarLuxo[XcAlr][2]+2.0,SvSpwCarLuxo[XcAlr][3],pCor,pCor,-1);
format(StrScv, sizeof(StrScv), "Voce comprou {666699}%s(%i){FFFFFF} por {33CC33}R$%i!",SvCNomeCars[TrValorVehLUXO[DefCar][1]-400],TrValorVehLUXO[DefCar][1],TrValorVehLUXO[DefCar][0]);
}
SvCarCOR[Slot][playerid] = pCor;
SendClientMessage(playerid, 0xFFFFFFFF, StrScv);
new SCCarid, Float:PosSC[4];
SCCarid = SVCarPLAYER[Slot][playerid];
path = SaveCarNomePlay(playerid);
if(!DOF2_FileExists(path)) DOF2_CreateFile(path);
GetVehiclePos(SCCarid, PosSC[0],PosSC[1],PosSC[2]);
GetVehicleZAngle(SCCarid, PosSC[3]);
format(StrCAR, sizeof(StrCAR), "CarID_%i", Slot);
DOF2_SetInt(path,StrCAR,GetVehicleModel(SCCarid));
format(StrCAR, sizeof(StrCAR), "PosX_%i", Slot);
DOF2_SetFloat(path,StrCAR,PosSC[0]);
format(StrCAR, sizeof(StrCAR), "PosY_%i", Slot);
DOF2_SetFloat(path,StrCAR,PosSC[1]);
format(StrCAR, sizeof(StrCAR), "PosZ_%i", Slot);
DOF2_SetFloat(path,StrCAR,PosSC[2]);
format(StrCAR, sizeof(StrCAR), "PosA_%i", Slot);
DOF2_SetFloat(path,StrCAR,PosSC[3]);
format(StrCAR, sizeof(StrCAR), "Cor_%i", Slot);
DOF2_SetInt(path,StrCAR,SvCarCOR[Slot][playerid]);
DOF2_SaveFile();
} else SvcShowDialgC(playerid);
return 1;
}
if(dialogid == SellCarPlyPly){
if(response){
new xPlayer,xValor,xSlot,RjhasfNome[32],StrScv[128];
if(sscanf(inputtext,"iii",xPlayer,xSlot,xValor)) return SendClientMessage(playerid , 0xFF0000FF , "Uso Correto /vendercarro [playerid][Slot][Valor]");
if(SVCarPLAYER[xSlot][playerid] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Você não está com o seu veiculo Spawnado!");
if(!IsPlayerConnected(xPlayer)) return SendClientMessage(playerid, 0xFFFFFFFF, "Este jogador não esta conectado!");
new Float:PosP[3]; GetPlayerPos(xPlayer,PosP[0],PosP[1],PosP[2]);
if(!IsPlayerInRangeOfPoint(playerid,5.0,PosP[0],PosP[1],PosP[2])) return SendClientMessage(playerid,0xFFFFFFFF,"Este jogador nao esta proximo a voce!");
new path[50],StrCAR[24];
path = SaveCarNomePlay(xPlayer);
format(StrCAR, sizeof(StrCAR), "CarID_%i", xSlot);
new SCCarid = DOF2_GetInt(path,StrCAR);
if(SCCarid < 400) return SendClientMessage(playerid, 0xFFFFFFFF, "Voce nao possui nenhum veiculo neste slot!");
pAceitar[xPlayer][0] = xValor;//Valor do Veiculo
pAceitar[xPlayer][1] = playerid;//ID do jogador que vendeu
pAceitar[xPlayer][2] = xSlot;//SLOT
GetPlayerName(playerid, RjhasfNome, sizeof(RjhasfNome));
format(StrScv, sizeof(StrScv), "[VEICULO]{FFFFFF} %s(%i) Quer te vender o veiculo (%s) por R$%i (/carmenu, opção [7])", RjhasfNome,playerid,SvCNomeCars[SCCarid-400],xValor);
SendClientMessage(xPlayer, 0x666699FF, StrScv);
GetPlayerName(xPlayer, RjhasfNome, sizeof(RjhasfNome));
format(StrScv, sizeof(StrScv), "[VEICULO]{FFFFFF} Voce enviou uma solicitação de venda do veiculo (%s) para o %s(%i) por R$%i", SvCNomeCars[SCCarid-400],RjhasfNome,xPlayer,xValor);
SendClientMessage(playerid, 0x666699FF, StrScv);
}else SvcShwDiagMenu(playerid);
return 1;
}
if(dialogid == Dial_conseTX){
if(response){
SvSelcCar[playerid] = listitem;
new ScStrG[500],rTing[128];
for(new i = 0; i < sizeof(SvC_InfCor); i++){
format(rTing, sizeof(rTing), "%s\n", SvC_InfCor[i][1]);
strcat(ScStrG, rTing);
}
ShowPlayerDialog(playerid, NIDConseCor, DIALOG_STYLE_LIST, "{666699}Seleciona a cor", ScStrG, "Proximo", "Voltar");
}else SvcShowDialgC(playerid);
return 1;
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock AlguemNoCarro(carroid){
for (new i = 0; i < MAX_PLAYERS; i++)
if (IsPlayerConnected(i))
if(GetPlayerVehicleID(i) == carroid){
return 1;
}
return 0;
}
new ScStrG[500];
strcat(ScStrG, "{FFFFFF}Concessionária Popular\n");
strcat(ScStrG, "Concessionária de Motos \n");
strcat(ScStrG, "Concessionária de LUXO\n");
return ShowPlayerDialog(playerid, Diag_ConfigCs1, DIALOG_STYLE_LIST, "{666699}Configurar Concessionária", ScStrG, "proximo", "Cancelar");
}
stock SvcShwDiagMenu(playerid){
new ScStrG[500];
strcat(ScStrG, "{FFFFFF}Estacionar\n");
strcat(ScStrG, "Localizar\n");
strcat(ScStrG, "Vender\n");
strcat(ScStrG, "Vender para um jogador\n");
strcat(ScStrG, "Aceitar a compra de um veiculo\n");
strcat(ScStrG, "Trancar\n");
strcat(ScStrG, "Destrancar\n");
if(SvC_BuySlotOnOff == true) strcat(ScStrG, "Upgrade Slots\n");
return ShowPlayerDialog(playerid, Diag_Menu_Car, DIALOG_STYLE_LIST, "{666699}Menu Carros", ScStrG, "Proximo", "Cancelar");
}
stock yChckVlrCar(modeid){
for (new i = 0; i < sizeof(TrValorVehNormal); i++)
if(TrValorVehNormal[i][1] == modeid) return TrValorVehNormal[i][0]/2;
for (new i = 0; i < sizeof(TrValorVehMotos); i++)
if(TrValorVehMotos[i][1] == modeid) return TrValorVehMotos[i][0]/2;
for (new i = 0; i < sizeof(TrValorVehLUXO); i++)
if(TrValorVehLUXO[i][1] == modeid) return TrValorVehLUXO[i][0]/2;
return 20000;
}
CMD:conse(playerid){
if(!IsPlayerInRangeOfPoint(playerid,2.0,2134.5073,-1155.5154,24.2175) && !IsPlayerInRangeOfPoint(playerid,2.0,2137.8337,-1155.5135,24.2175)
&& !IsPlayerInRangeOfPoint(playerid,2.0,-1968.4557,294.0216,35.1719)) return SendClientMessage(playerid, 0xFF0000FF, "Você não está em uma conse!");
return SvcShowDialgC(playerid);
}
Bom dia/tarde/noite, estou com uma duvida que possivelmente é muito simples de ser resolvida.
Existe um meio bem mais optimizado e eficaz, capaz de restar todos as entrelinhas que contem dentro de uma enum de uma vez só?
Exemplo:
Código PHP:
enum EnumReset { LinhaUm, LinhaDois, Float:LinhaTres, Bool:LinhaQuatro } new EnumInfo[EnumReset]
No caso, um meio de resetar todas esses dados contido nela de uma vez só, envés de fazer:
Estou criando uma concessionária, e antes tinha feito de uma forma muito extensa, e acabou que a dialog parou de reconhecer outros modelos de veículos
Então, o que eu não consegui fazer é: através da linha abaixo, eu defino o modelo do veículo, seu valor e o seu tipo (0 - bicicletas, 1 - carros, etc...).
Nesse caso, ele não consegue ler o modelid de TODOS os veículos do tipo 0, e gostaria que lesse, pois senão eu teria que trocar o "DealerData...." por {modelid, modelid, modelid} e etc...
Consegui instalar o sampvoice 3.0 sem erro nenhum nos logs, mas, o icone do microfone não aparece no samp launcher, mesmo ativando o chat de voz lá no app.
E aí Galera, Dessa Vez Venho Trazer Uma GameMode RPG Muito Divertido de Jogar e Já Foi Um dos TOP's Servers SAMP.
Sistemas Únicos:
-Empresas Com Produção a Cada 10 Horas, Onde o Dono Contrata Empregados(a) Que Buscam Mercadoria Em LV e SF, e Entregam na Empresa; -Casas Com Veiculo Próprio Podendo o Proprietário Ter Veículos V2, Sendo Que Jogador Normal Pode Ter Ate 3 Veículos e 1 Empresa. Já Um Jogador VIP Pode Ter 4 Veículos e 2 Empresas; -Sistema de Corregedoria Uecap (unidade Especializada Conta Abusos Policiais) -Batalhões Policiais: Rectd - Rede Especializada Contra Trafico de Drogas Berf - Batalhão Especializado Em Roubos e Furtos
E muitos outros !
GM UNICA 100% FEITA DO ZERO.
Sistemas Exclusivos !!!
Sistema de Empresas; Sistema de Mercadoria Para Empresas; Sistema de Casas; Sistema de Profissões; Sistema de Clã; Sistema de Org's; Sistema de Bases; Sistema VIP (VIP Ouro e VIP Diamante); Sistema de Utilitários; Sistema de Banco; Sistema X1; Sistema de PVP; Sistema de Prefeito(a); Sistema de Tunagem;
E muito mais !!!
[ATENÇÃO] Todos os FilterScripts necessários estão ativados.
Alguns Comandos Úteis:
/rcon login [SUA SENHA] (Coloque a senha no arquivo "server") /setadmin [ID] [1 a 5] /admins /vips /comandosadm /vantagensvip /dargrana [ID] [GRANA] /setlevel [ID] [LEVEL] /radioon /radiooff
Obs¹: A GM não foi feita e nem editada por mim, caso os criadores queiram reivindicar a autoria da mesma fiquem a vontade. Obs²: Viu algo errado? Me avise. Obs³: Eu só estou aqui para postar a GM mas caso o autor da GM não tenha gostado do Post me avise.
Eu gostaria de saber se vocês podem me tirar uma dúvida.
Eu estou começando a usar o discord-connector.
E eu gostaria de saber se existe alguma forma de eu conseguir o userid pelo nome de usuário.
Exemplo: rafinha#7777 e ele me retornar o userid do discord alguém sabe se existe essa função nessa include/plugin ? Se souberem por me ajudem, agradeço desde já.
Então rapaziada, recentemente formatei meu PC e instalei tudo da maneira correta e como deve ser feito, porém, SOMENTE no SAMP apareceu dessa forma, não reconhecendo a acentuação ( ´~ç´ ) dentre outras. Antes que perguntem, já chequei o idioma do PC, chequei a região e tudo, está tudo certo. Vale ressaltar que esse problema é somente no SAMP, já reinstalei, instalei e nada. print