03.12.2012, 12:18
(
Последний раз редактировалось Urubu_Rei; 03.12.2012 в 13:18.
)
Olб Amigos, como estгo ? Tranquilos ?
Quando eu dou /alugarcarro nгo acontece absolutamente NADA !
e o carro nгo aluga tambйm.
*EDIT
Isto estб errado, nгo estou conseguindo um jeito de arrumar, nгo quero ficar colocando os ID dos carros.
Tentei vбrias formas mas nгo consegui.
Quando eu dou /alugarcarro nгo acontece absolutamente NADA !
e o carro nгo aluga tambйm.
pawn Код:
if(strcmp(cmd, "/alugarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsAAluguel1(carid))
{
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)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк tem que desalugar o outro veiculo !");
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(IsAAluguel1(carid))
{
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)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк tem que desalugar o outro veiculo !");
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(IsAAluguel1(carid))
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney (playerid) < SBizzInfo[21][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem esse dinheiro !");
return 1;
}
if(HireCar[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк tem que desalugar o outro veiculo !");
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;
}
if(strcmp(cmd, "/desalugarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(HireCar[playerid] != 299)
{
new idcar = GetPlayerVehicleID(playerid);
if(idcar == HireCar[playerid])
{
TogglePlayerControllable(playerid, 1);
}
SetVehicleToRespawn(HireCar[playerid]);
VTrancado[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
HireCar[playerid] = 0;
GameTextForPlayer(playerid, "~w~Voce desalugou o carro", 5000, 3);
}
}
return 1;
}
pawn Код:
if(IsAAluguel1(carid))
Tentei vбrias formas mas nгo consegui.