/rentcar - problem
#1

If I go in car and do /exit + /engine I start rentcar and for free I don't rent it I just start it..how can I make it not start?but I want /exit to work..


PHP код:
if(strcmp(cmd"/rentcar"true) == 0)
                    {
                        if(
IsPlayerConnected(playerid))
                        {
                            for(new 
0sizeof(rentcar); i++)
                            {
                                if(
GetPlayerVehicleID(playerid) == rentcar[i]) continue;
                            }
                            new 
hirefee HireCost(GetPlayerVehicleID(playerid));
                            
/*if(SBizzInfo[1][sbProducts] == 0)
                            {
                                GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
                                return 1;
                            }*/
                            
if(SBizzInfo[0][sbProducts] == 0)
                            {
                                
GameTextForPlayer(playerid"~r~Out Of Stock"50001);
                                return 
1;
                            }
                            if (
GetPlayerCash(playerid) < SBizzInfo[1][sbEntranceCost])
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"   You dont have that much cash !");
                                return 
1;
                            }
                            if (
GetPlayerCash(playerid) < SBizzInfo[0][sbEntranceCost])
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"   You dont have that much cash !");
                                return 
1;
                            }
                            if(
HireCar[playerid] != 299)
                            {
                                
gCarLock[HireCar[playerid]] = 0;
                                
UnLockCar(HireCar[playerid]);
                                
SendClientMessage(playeridCOLOR_GREY"Ai deja un vehicol inchiriat,dai /unrentveh,ca sa poti inchiria altceva!");
                                return 
1;
                            }
                            for(new 
i=0i<MAX_PLAYERSi++)
                            {
                                if(
HireCar[i] == GetPlayerVehicleID(playerid))
                                {
                                    
SendClientMessage(playeridCOLOR_GREY" Cineva are deja inchirieata masina asta !");
                                    return 
1;
                                }
                            }
                            
GivePlayerCash(playerid,-SBizzInfo[1][sbEntranceCost]);
                            
SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
                            
ExtortionSBiz(1SBizzInfo[1][sbEntranceCost]);
                            
SBizzInfo[1][sbProducts]--;
                            
//
                            
GivePlayerCash(playerid,-SBizzInfo[0][sbEntranceCost]);
                            
SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
                            
ExtortionSBiz(0SBizzInfo[0][sbEntranceCost]);
                            
SBizzInfo[0][sbProducts]--;
                            
HireCar[playerid] = GetPlayerVehicleID(playerid);
                            
OnPropUpdate();
                            
PlayerPlaySound(playerid10520.00.00.0);
                            
format(stringsizeof(string), "~w~Don't forget to ~r~/unrentveh~n~~g~/lock ~w~to lock your car.",hirefee);
                            
SendClientMessage(playeridCOLOR_RED"Dai /engine ca sa pornesti motorul!");
                            
SendClientMessage(playeridCOLOR_WHITE"Dati /unrentveh ca sa poti inchiria,alt vehicol!");
                            
SendClientMessage(playeridCOLOR_RED"Dai /lock ca sa inchizi/deschizi masina inchiriata.");
                            
GameTextForPlayer(playeridstring50003);
                        }
                        return 
1;
                    } 
Reply


Messages In This Thread
/rentcar - problem - by Akcent_Voltaj - 09.06.2013, 13:33
Re: /rentcar - problem - by Aly - 09.06.2013, 13:37
Re: /rentcar - problem - by Akcent_Voltaj - 09.06.2013, 13:44
Re: /rentcar - problem - by Aly - 09.06.2013, 13:46
Re: /rentcar - problem - by Akcent_Voltaj - 09.06.2013, 13:52
Re: /rentcar - problem - by Akcent_Voltaj - 09.06.2013, 14:04

Forum Jump:


Users browsing this thread: 1 Guest(s)