17.06.2014, 22:09
Acho que nao seria facil assim... deixa eu postar o comando enteiro pq eu to achando que vo bugar as coisas aqui, olha isso tem 2 coisas nгo to sabendo qual e a dos carros de aluguel
Tem isso:
E tem isso
Tem isso:
pawn Код:
if(strcmp(cmd, "/alugarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if((GetPlayerVehicleID(playerid) >= 325 && GetPlayerVehicleID(playerid) <= 352) || (GetPlayerVehicleID(playerid) >= 559 && GetPlayerVehicleID(playerid) <= 562))
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney (playerid) < SBizzInfo[1][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem esse dinheiro !");
return 1;
}
if(HireCar[playerid] > 0)
{
ShowPlayerDialog(playerid, 5024, DIALOG_STYLE_MSGBOX, "Desalugar", "Vocк jб tem um Veiculo alugado.\nDeseja desalugar-lo?", "Sim", "Nгo");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HireCar[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Alguem jб alugou esse veiculo !");
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicleEx(playerid);
return 1;
}
}
GivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Voce pode ~r~/desalugarcarro~n~~g~ou /trancar ~w~ para trancar o carro.",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
return 1;
}
else if((GetPlayerVehicleID(playerid) >= 305 && GetPlayerVehicleID(playerid) <= 324) || (GetPlayerVehicleID(playerid) >= 457 && GetPlayerVehicleID(playerid) <= 467))
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney (playerid) < SBizzInfo[20][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem esse dinheiro !");
RemovePlayerFromVehicle(playerid);
return 1;
}
if(HireCar[playerid] > 0)
{
ShowPlayerDialog(playerid, 5024, DIALOG_STYLE_MSGBOX, "Desalugar", "Vocк jб tem um Veiculo alugado.\nDeseja desalugar-lo?", "Sim", "Nгo");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HireCar[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Alguem jб alugou esse veiculo !");
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicleEx(playerid);
return 1;
}
}
GivePlayerMoney(playerid,-SBizzInfo[19][sbEntranceCost]);
SBizzInfo[19][sbTill] += SBizzInfo[19][sbEntranceCost];
ExtortionSBiz(19, SBizzInfo[19][sbEntranceCost]);
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Voce pode ~r~/desalugarcarro~n~~g~ou /trancar ~w~ para trancar o carro.",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
return 1;
}
else if((GetPlayerVehicleID(playerid) >= 379 && GetPlayerVehicleID(playerid) <= 391) || (GetPlayerVehicleID(playerid) >= 457 && GetPlayerVehicleID(playerid) <= 467))
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney (playerid) < SBizzInfo[20][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem esse dinheiro !");
return 1;
}
if(HireCar[playerid] > 0)
{
ShowPlayerDialog(playerid, 5024, DIALOG_STYLE_MSGBOX, "Desalugar", "Vocк jб tem um Veiculo alugado.\nDeseja desalugar-lo?", "Sim", "Nгo");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HireCar[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Alguem jб alugou esse veiculo !");
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicleEx(playerid);
return 1;
}
}
GivePlayerMoney(playerid,-SBizzInfo[20][sbEntranceCost]);
SBizzInfo[20][sbTill] += SBizzInfo[20][sbEntranceCost];
ExtortionSBiz(20, SBizzInfo[20][sbEntranceCost]);
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Voce pode ~r~/desalugarcarro~n~~g~ou /trancar ~w~ para trancar o carro.",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
return 1;
}
else if((GetPlayerVehicleID(playerid) >= 459 && GetPlayerVehicleID(playerid) <= 464) || (GetPlayerVehicleID(playerid) >= 417 && GetPlayerVehicleID(playerid) <= 422) || (GetPlayerVehicleID(playerid) >= 375 && GetPlayerVehicleID(playerid) <= 376))
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney (playerid) < SBizzInfo[20][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem esse dinheiro !");
RemovePlayerFromVehicle(playerid);
return 1;
}
if(HireCar[playerid] > 0)
{
ShowPlayerDialog(playerid, 5024, DIALOG_STYLE_MSGBOX, "Desalugar", "Vocк jб tem um Veiculo alugado.\nDeseja desalugar-lo?", "Sim", "Nгo");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HireCar[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "Alguem jб alugou esse veiculo !");
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicleEx(playerid);
return 1;
}
}
GivePlayerMoney(playerid,-SBizzInfo[20][sbEntranceCost]);
SBizzInfo[20][sbTill] += SBizzInfo[20][sbEntranceCost];
ExtortionSBiz(20, SBizzInfo[20][sbEntranceCost]);
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Voce pode ~r~/desalugarcarro~n~~g~ou /trancar ~w~ para trancar o carro.",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
return 1;
}
}
return 1;
}
pawn Код:
if((newcar >= 305 && newcar <= 324) || (newcar >= 457 && newcar <= 467) || (newcar >= 325 && newcar <= 352) || (newcar >= 559 && newcar <= 562)
|| (newcar >= 379 && newcar <= 391) || (newcar >= 457 && newcar <= 467) || (newcar >= 459 && newcar <= 464) || (newcar >= 417 && newcar <= 422)
|| (newcar >= 375 && newcar <= 376))
{
if (HireCar[playerid] != newcar)
{
new Aluguelbox[256];
format(Aluguelbox, sizeof(Aluguelbox),"Este Veiculo pode ser alugado Preзo:R$%d\nDeseja Aluga-lo ?", SBizzInfo[1][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
ShowPlayerDialog(playerid, DIALOG_ALUGAR, DIALOG_STYLE_MSGBOX, "Aluguel de Veiculos", Aluguelbox, "Sim", "Nгo");
}
}
else if(IsABikeCar(newcar))
{
SendClientMessage(playerid, 0x33FF00FF, "{43CD80}****** {54FF9F}veiculo de Novatos {43CD80}******");
SendClientMessage(playerid, 0x33FF00FF, "{FF8247}Vб ate a prefeitura para escolher um emprego, use {00FF00}/gps{FF8247}.");
SendClientMessage(playerid, 0x33FF00FF, "{FF8247}Caso precise de uma ajuda chame um Helper, basta utilizar {00FF00}/duvida{FF8247}.");
}