Dealership Hotwire!
#1


Heey

Okay so the thing is i mapped a dealership for planes/helis
and added some buyable Planes and Helicopters

but you can hotwire the dealership vehicles :/..
Reply
#2

What about posting some code?
Reply
#3

Код:
        if(!strcmp(cmd, "/hotwire", true))
{
if(engineOn[GetPlayerVehicleID(playerid)]) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Engine already started!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Your key Please");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Only the driver can do this!");
if(IsAtDealership(playerid)) return SendClientMessage(playerid, COLOR_DARKRED, "You can't hotwire this vehicle!");
if(pveh == 510) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "You don't need to start a bike!");
if(pveh == 462) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "You don't need to start a bike!");
if(idcar == 59 || idcar == 60) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Access denied!");
if(IsAtCarrental(playerid)) return SendClientMessage(playerid, COLOR_DARKRED, "You can't hotwire this vehicle!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s tries to hotwire the car", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHT_BLUE,COLOR_LIGHT_BLUE,COLOR_LIGHT_BLUE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("StartingTheVehicle",7000,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Hotwiring The Vehicle...",3500,3);
gEngine[playerid] = 1;
return 1;
Reply
#4

show me this function: IsAtDealership(playerid)

This forum requires that you wait 120 seconds between posts. Please try again in 20 seconds.
Reply
#5

Код:
public IsAtDealership(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerToPoint(25.0,playerid,2128.0864,-1135.3912,25.5855) || PlayerToPoint(50,playerid,537.3366,-1293.2140,17.2422) || PlayerToPoint(35,playerid,2521.5544,-1524.4504,23.8365) || PlayerToPoint(50,playerid,2155.0146,-1177.3333,23.8211) || PlayerToPoint(50,playerid,299.1723,-1518.6627,24.6007))
		{
			return 1;
		}
i asume this one.
Reply
#6

Quote:
Originally Posted by NotoriousMOB
Посмотреть сообщение
Код:
public IsAtDealership(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerToPoint(25.0,playerid,2128.0864,-1135.3912,25.5855) || PlayerToPoint(50,playerid,537.3366,-1293.2140,17.2422) || PlayerToPoint(35,playerid,2521.5544,-1524.4504,23.8365) || PlayerToPoint(50,playerid,2155.0146,-1177.3333,23.8211) || PlayerToPoint(50,playerid,299.1723,-1518.6627,24.6007))
		{
			return 1;
		}
i asume this one.
And your sure thats the coords?
Reply
#7

yes i didn't touch that part.

i have 3-4 other dealerships
With Cars and Bikes.
Reply
#8

Quote:
Originally Posted by NotoriousMOB
Посмотреть сообщение
yes i didn't touch that part.

i have 3-4 other dealerships
With Cars and Bikes.
Then im not sure.. what about adding an variable to check if the vehicle is bought?
Reply
#9

Код:
        if(!strcmp(cmd, "/hotwire", true))
{
if(engineOn[GetPlayerVehicleID(playerid)]) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Engine already started!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Your key Please");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Only the driver can do this!");
//if(IsAtDealership(playerid)) return SendClientMessage(playerid, COLOR_DARKRED, "You can't hotwire this vehicle!"); 
if(pveh == 510) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "You don't need to start a bike!");
if(pveh == 462) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "You don't need to start a bike!");
if(idcar == 59 || idcar == 60) return SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Access denied!");
if(IsAtCarrental(playerid)) return SendClientMessage(playerid, COLOR_DARKRED, "You can't hotwire this vehicle!");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s tries to hotwire the car", sendername);
ProxDetector(30.0, playerid, string, COLOR_LIGHT_BLUE,COLOR_LIGHT_BLUE,COLOR_LIGHT_BLUE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("StartingTheVehicle",7000,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Hotwiring The Vehicle...",3500,3);
gEngine[playerid] = 1;
return 1;
Should work now.
Reply
#10

Quote:

Should work now.

Im still able to hotwire it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)