[Ajuda] Wang Cars
#1

Olб, eu sou um pouco novo nesta linha de scriptar, ainda estou aprendendo um pouquinho, eu uso o GM Muca, e queria saber se vocкs poderiam me ajudar a criar uma Wang Cars compativel para o Muca, eu tentei fazer um com a comparaзгo de outro, mais nгo consegui, se vocк poder me ajudar agradeзo deis de jб, pois й algo dificil, que acredito que muito depois muitas pessoas tambem vгo precisar... Obrigado.
Reply
#2

Wang Cars, seria no caso uma alugadora de veнculos?
Procure um FS nas boards do fуrum, concerteza irбs achar ^^.
Reply
#3

Nгo, й uma concessionaria dentro de um local e com as setas vocк vai escolhendo e tals seu carro, eu achei um codigo aqui no fуrum que tem a Wang cars, mais ele nгo foi compativel com o muca e acho que ainda falta configuraзгo, se alguem puder me ajudar agradeзo..
Reply
#4

posta o cуdigo ai.
Reply
#5

Tem esse sistema no Geral RP. Baixe-o e retire e coloque os crйditos do ou dos autores.
Reply
#6

#define VEH_SAVE_FILE "Conce/%s.ini"

//------------------------------[Conce]-----------------------------------------
enum vInfo
{
vModel,
Float:vX,
Float:vY,
Float:vZ,
Float:vA,
Float:vPX,
Float:vPY,
Float:vPZ,
Float:vPA,
vColor1,
vColor2,
vPaintjob,
vMod[MAX_MODS],
vOwner[MAX_PLAYER_NAME],
vName[128],
vLock,
vPRFLock,
vPark,
}

//--------------------------------[Conce]---------------------------------------

for(new i = 0; i < MAX_PLAYERS; i++)
{
CarColor[i][0] = 1;
CarColor[i][1] = 1;
}
for(new v = 1; v < CAR_AMOUNT; v++)
{
VehicleInfo[v][vModel] = 0;
VehicleInfo[v][vX] = 0;
VehicleInfo[v][vY] = 0;
VehicleInfo[v][vZ] = 0;
VehicleInfo[v][vA] = 0;
VehicleInfo[v][vColor1] = -1;
VehicleInfo[v][vColor2] = -1;
VehicleInfo[v][vPaintjob] = -1;
format(VehicleInfo[v][vName], MAX_PLAYER_NAME, "Nenhum");
format(VehicleInfo[v][vOwner], MAX_PLAYER_NAME, "Nenhum");
VehicleInfo[v][vLock] = 0;
VehicleInfo[v][vPRFLock] = 0;
VehicleInfo[v][vPark] = 0;
VehicleInfo[v][vPX] = 0;
VehicleInfo[v][vPY] = 0;
VehicleInfo[v][vPZ] = 0;
VehicleInfo[v][vPA] = 0;
for(new m = 0; m < MAX_MODS; m++) VehicleInfo[v][vMod][m] = 0;
}

//-----------------------[Conce]------------------------------------------------
LoadPlayerVehicle(playerid);
CarColor[playerid][0] = 1;
CarColor[playerid][1] = 1;
for(new v = 1; v < MAX_VEHICLES; v++) LockVehicle(v);

new playername[MAX_PLAYER_NAME],gw;

//--------------------------------[Conce]---------------------------------------
if (!strcmp("/comprarcarro", cmdtext, true))
{
if(PlayerToPoint(2.0, playerid, 555.9089,-1289.4904,17.2482))
{
for(new i=0;i<MAX_PLAYERS;i++){if(Conce[i]==1){SendClientMessage(playerid, COLOR_OOC, "Alguйm Ja Estб Comprando Um Veiculo Aguarde");TogglePlayerControllable(playerid, 1);return 1;}}
if (GetOwnedVehicleID(playerid) != INVALID_VEHICLE_ID) return SendClientMessage(playerid, RED, "Vocк Ja Possui Um Veiculo!");
if (GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, RED, "Saia de seu interior"); // To prevent screw ups
GetPlayerPos(playerid, OrgX[playerid], OrgY[playerid], OrgZ[playerid]);
new color1 = CarColor[playerid][0];
new color2 = CarColor[playerid][1];
TogglePlayerControllable(playerid, 0);
SetPlayerCameraPos(playerid, -1980.9927,293.0207,38.9285);
SetPlayerCameraLookAt(playerid, -1971.9277,284.5396,34.8777);
SetPlayerVirtualWorld(playerid, playerid);
ShopCar[playerid] = CreateVehicle(CarModels[0], -1972.5745,284.5845,34.8772, 0.0, color1, color2, 6000000);
SetVehicleVirtualWorld(ShopCar[playerid], playerid);
PutPlayerInVehicle(playerid, ShopCar[playerid], 0);
TogglePlayerControllable(playerid, 0);
CarShopping[playerid] = true;
Conce[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Carros Sport custam R$90.000,00 Motos velozes R$50.000,00 Carros Populares R$32.000,00");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Motos normais custam R$15.000,00 E veнculos aйreos custam mais de R$ 1.000.000,00");
SendClientMessage(playerid, COLOR_GREY, "Vocк Pode Trocar os Carros Apertando As Setas do Teclado");
SendClientMessage(playerid, COLOR_GREY, "Para Adquirir O Carro Basta Apertar a Tecla CTRL de Seu Teclado");
SendClientMessage(playerid, COLOR_GREY, "Para Sair Da Concessionaria Basta Apertar a Tecla F ou Enter de Seu Teclado");
SendClientMessage(playerid, COLOR_GREEN, "Jб Possui Um Veiculo Em Mente? Use /pularveiculo [Nomedocarro] Obs:Й Mais Recomendado Usar o CMD");
SendClientMessage(playerid, COLOR_YELLOW, "Para mudar a cor do carro antes de comprar digite /corcarro COR1 COR2!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Bugou ? Nгo Consegue Sair Use /sairconce!");
SetTimerEx("BrowseCars", 300, 0, "d", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк presisa estar na concessionбria");
}
return 1;
}

if (!strcmp("/pularveiculo", cmd, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб na Concessionбria!");
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED, "[Use] /pularveiculo [Nomedocarro/id]");
new id = GetVehicleModelIDFromName(tmp);
if (id < 400 || id > 611) return SendClientMessage(playerid, RED, "ID Invalido/Nгo possui em nossa concessionбria");
new color1 = CarColor[playerid][0];
new color2 = CarColor[playerid][1];
carbrowse[playerid] = id-400;
DestroyVehicle(ShopCar[playerid]);
ShopCar[playerid] = CreateVehicle(CarModels[carbrowse[playerid]], -1972.5745,284.5845,34.8772, 0.0, color1, color2, 6000000);
SetVehicleVirtualWorld(ShopCar[playerid], playerid);
PutPlayerInVehicle(playerid, ShopCar[playerid], 0);
return 1;
}
if (!strcmp("/sairconce", cmdtext, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб na concessionбria!");
Conce[playerid] = 0;
DestroyVehicle(ShopCar[playerid]);
TogglePlayerControllable(playerid, true);
CarShopping[playerid] = false;
carbrowse[playerid] = 0;
GameTextForPlayer(playerid, " ", 1000, 3);
SetPlayerPos(playerid, 556.9771,-1284.8324,17.2482);
SetPlayerFacingAngle(playerid, OrgA[playerid]);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
return 1;
}

if (!strcmp("/corcarro", cmd, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб no shopping de carros!");
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED, "[Use] /corcarro [color id 1] [color id 2]");
new color1 = strval(tmp);
if (color1 < 0 || color1 > 300) return SendClientMessage(playerid, RED, "Use de 0/300.");
CarColor[playerid][0] = color1;
new color2;
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) color2 = color1;
else color2 = strval(tmp);
if (color2 < 0 || color2 > 300) return SendClientMessage(playerid, RED, "Use de 0/300.");
CarColor[playerid][1] = color2;
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
return 1;
}

if (!strcmp("/pjcarro", cmd, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб no shopping de carros!");
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED, "[Use] /pjcarro 0 a 2");
new color1 = strval(tmp);
if (color1 < 0 || color1 > 2) return SendClientMessage(playerid, RED, "Use de 0/2.");
CarColor[playerid][0] = color1;
ChangeVehiclePaintjob(GetPlayerVehicleID(playerid) , color1);
return 1;
}

Й ESSE mais tem que configurar para o GM Muca.. D:
Reply
#7

Quote:
Originally Posted by Sr.Pekeno
Посмотреть сообщение
#define VEH_SAVE_FILE "Conce/%s.ini"

//------------------------------[Conce]-----------------------------------------
enum vInfo
{
vModel,
Float:vX,
Float:vY,
Float:vZ,
Float:vA,
Float:vPX,
Float:vPY,
Float:vPZ,
Float:vPA,
vColor1,
vColor2,
vPaintjob,
vMod[MAX_MODS],
vOwner[MAX_PLAYER_NAME],
vName[128],
vLock,
vPRFLock,
vPark,
}

//--------------------------------[Conce]---------------------------------------

for(new i = 0; i < MAX_PLAYERS; i++)
{
CarColor[i][0] = 1;
CarColor[i][1] = 1;
}
for(new v = 1; v < CAR_AMOUNT; v++)
{
VehicleInfo[v][vModel] = 0;
VehicleInfo[v][vX] = 0;
VehicleInfo[v][vY] = 0;
VehicleInfo[v][vZ] = 0;
VehicleInfo[v][vA] = 0;
VehicleInfo[v][vColor1] = -1;
VehicleInfo[v][vColor2] = -1;
VehicleInfo[v][vPaintjob] = -1;
format(VehicleInfo[v][vName], MAX_PLAYER_NAME, "Nenhum");
format(VehicleInfo[v][vOwner], MAX_PLAYER_NAME, "Nenhum");
VehicleInfo[v][vLock] = 0;
VehicleInfo[v][vPRFLock] = 0;
VehicleInfo[v][vPark] = 0;
VehicleInfo[v][vPX] = 0;
VehicleInfo[v][vPY] = 0;
VehicleInfo[v][vPZ] = 0;
VehicleInfo[v][vPA] = 0;
for(new m = 0; m < MAX_MODS; m++) VehicleInfo[v][vMod][m] = 0;
}

//-----------------------[Conce]------------------------------------------------
LoadPlayerVehicle(playerid);
CarColor[playerid][0] = 1;
CarColor[playerid][1] = 1;
for(new v = 1; v < MAX_VEHICLES; v++) LockVehicle(v);

new playername[MAX_PLAYER_NAME],gw;

//--------------------------------[Conce]---------------------------------------
if (!strcmp("/comprarcarro", cmdtext, true))
{
if(PlayerToPoint(2.0, playerid, 555.9089,-1289.4904,17.2482))
{
for(new i=0;i<MAX_PLAYERS;i++){if(Conce[i]==1){SendClientMessage(playerid, COLOR_OOC, "Alguйm Ja Estб Comprando Um Veiculo Aguarde");TogglePlayerControllable(playerid, 1);return 1;}}
if (GetOwnedVehicleID(playerid) != INVALID_VEHICLE_ID) return SendClientMessage(playerid, RED, "Vocк Ja Possui Um Veiculo!");
if (GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, RED, "Saia de seu interior"); // To prevent screw ups
GetPlayerPos(playerid, OrgX[playerid], OrgY[playerid], OrgZ[playerid]);
new color1 = CarColor[playerid][0];
new color2 = CarColor[playerid][1];
TogglePlayerControllable(playerid, 0);
SetPlayerCameraPos(playerid, -1980.9927,293.0207,38.9285);
SetPlayerCameraLookAt(playerid, -1971.9277,284.5396,34.8777);
SetPlayerVirtualWorld(playerid, playerid);
ShopCar[playerid] = CreateVehicle(CarModels[0], -1972.5745,284.5845,34.8772, 0.0, color1, color2, 6000000);
SetVehicleVirtualWorld(ShopCar[playerid], playerid);
PutPlayerInVehicle(playerid, ShopCar[playerid], 0);
TogglePlayerControllable(playerid, 0);
CarShopping[playerid] = true;
Conce[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Carros Sport custam R$90.000,00 Motos velozes R$50.000,00 Carros Populares R$32.000,00");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Motos normais custam R$15.000,00 E veнculos aйreos custam mais de R$ 1.000.000,00");
SendClientMessage(playerid, COLOR_GREY, "Vocк Pode Trocar os Carros Apertando As Setas do Teclado");
SendClientMessage(playerid, COLOR_GREY, "Para Adquirir O Carro Basta Apertar a Tecla CTRL de Seu Teclado");
SendClientMessage(playerid, COLOR_GREY, "Para Sair Da Concessionaria Basta Apertar a Tecla F ou Enter de Seu Teclado");
SendClientMessage(playerid, COLOR_GREEN, "Jб Possui Um Veiculo Em Mente? Use /pularveiculo [Nomedocarro] Obs:Й Mais Recomendado Usar o CMD");
SendClientMessage(playerid, COLOR_YELLOW, "Para mudar a cor do carro antes de comprar digite /corcarro COR1 COR2!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Bugou ? Nгo Consegue Sair Use /sairconce!");
SetTimerEx("BrowseCars", 300, 0, "d", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Vocк presisa estar na concessionбria");
}
return 1;
}

if (!strcmp("/pularveiculo", cmd, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб na Concessionбria!");
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED, "[Use] /pularveiculo [Nomedocarro/id]");
new id = GetVehicleModelIDFromName(tmp);
if (id < 400 || id > 611) return SendClientMessage(playerid, RED, "ID Invalido/Nгo possui em nossa concessionбria");
new color1 = CarColor[playerid][0];
new color2 = CarColor[playerid][1];
carbrowse[playerid] = id-400;
DestroyVehicle(ShopCar[playerid]);
ShopCar[playerid] = CreateVehicle(CarModels[carbrowse[playerid]], -1972.5745,284.5845,34.8772, 0.0, color1, color2, 6000000);
SetVehicleVirtualWorld(ShopCar[playerid], playerid);
PutPlayerInVehicle(playerid, ShopCar[playerid], 0);
return 1;
}
if (!strcmp("/sairconce", cmdtext, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб na concessionбria!");
Conce[playerid] = 0;
DestroyVehicle(ShopCar[playerid]);
TogglePlayerControllable(playerid, true);
CarShopping[playerid] = false;
carbrowse[playerid] = 0;
GameTextForPlayer(playerid, " ", 1000, 3);
SetPlayerPos(playerid, 556.9771,-1284.8324,17.2482);
SetPlayerFacingAngle(playerid, OrgA[playerid]);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
return 1;
}

if (!strcmp("/corcarro", cmd, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб no shopping de carros!");
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED, "[Use] /corcarro [color id 1] [color id 2]");
new color1 = strval(tmp);
if (color1 < 0 || color1 > 300) return SendClientMessage(playerid, RED, "Use de 0/300.");
CarColor[playerid][0] = color1;
new color2;
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) color2 = color1;
else color2 = strval(tmp);
if (color2 < 0 || color2 > 300) return SendClientMessage(playerid, RED, "Use de 0/300.");
CarColor[playerid][1] = color2;
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
return 1;
}

if (!strcmp("/pjcarro", cmd, true))
{
if (CarShopping[playerid] == false) return SendClientMessage(playerid, RED, "[Erro] Vocк nгo estб no shopping de carros!");
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED, "[Use] /pjcarro 0 a 2");
new color1 = strval(tmp);
if (color1 < 0 || color1 > 2) return SendClientMessage(playerid, RED, "Use de 0/2.");
CarColor[playerid][0] = color1;
ChangeVehiclePaintjob(GetPlayerVehicleID(playerid) , color1);
return 1;
}

Й ESSE mais tem que configurar para o GM Muca.. D:
manda o Muca, ...
Reply
#8

Desculpe o EDIT, Nгo queria floodar...
Bom alguem poderia me ajudar?? isso й algo muito importante para mim..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)