/rentcar problem . -
Kirchhoff - 02.04.2010
Ok i have on my server the rent car system . When you enter a car for rent at grotii it appears the message : Rent cost : 1000 $ , Tipe /rentcar or /exit
All it works except /rentcar . If you tipe /rentcar it says : Server : Uknown command . I want to make an command that if you tipe /rentcar and press enter to say : The car is rented by you . And you can drive the rented car . And if you don't want to rent that car anymore to tipe : /unrentcar and to say : The car is no longer by you .
Edit : The print in the server : [img width=960 height=768]http://i39.tinypic.com/24ot6za.png[/img]
Re: /rentcar problem . -
Drake1994 - 02.04.2010
change the return 1; in the command to return 0;
Re: /rentcar problem . -
Kirchhoff - 02.04.2010
what ?
Re: /rentcar problem . -
Kirchhoff - 02.04.2010
up
Re: /rentcar problem . -
nikola1991 - 02.04.2010
if(strcmp(cmd, "/rentcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
new modelid = GetVehicleModel(vehicleid);
if(modelid == 424 || modelid == 424)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if(modelid == 424 || modelid == 424)
{
if(SBizzInfo[0][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == 0)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) < SBizzInfo[0][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, " Nemate dovolno pari !");
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
SBizzInfo[0][sbProducts]--;
}
if(modelid == 424 || modelid == 424)
{
if(SBizzInfo[1][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == 1)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) < SBizzInfo[1][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, " Nemate dovolno pari !");
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbProducts]--;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Se nadevame deka uzivate ~n~vo koristenje na ova avto~n~Da go otklucite ili zaklucite~n~napisete ~g~/lock~n~~w~vozete vnimatelno",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
return 1;
}
Re: /rentcar problem . -
Kirchhoff - 03.04.2010
and where to add this ? Can you tell me please ...
Edit : this is not working . I added you on msn . When you can enter so we can tlak !
Re: /rentcar problem . -
Kirchhoff - 03.04.2010
up
Re: /rentcar problem . -
Kirchhoff - 04.04.2010
up
Re: /rentcar problem . -
Kirchhoff - 04.04.2010
Never mind no one can help me i must pay someone . Solved !