help with carshow
#1

Ok so I started making a carshow script where when players enter im going to make it so there will be 2 events, one where they can vote on the car they like best and a hydrolic compition. I need some help with the hydrolic part what im trying to do is make it so when the car show is started and I start the hydro event playes get a min to bounce there car and it will show a meter showing them how high in inchs or feet they bounced off the ground each time and at the end it will give the winner street credit a system I have in my gm. I just started to code this i have a idea on how to do the meter but a better understanding would be nice.

Код:

COMMAND:joincarshow(playerid,params[])
{
	#pragma unused params
	{
		carshow1[playerid] = 1;
   	GivePlayerMoney(playerid, -500);
   	new rand = random(sizeof carshowSpawns);
  	SetPlayerPos(playerid, carshowSpawns[rand][0], carshowSpawns[rand][1], carshowSpawns[rand][2]);
    SetPlayerInterior(playerid, 7);
    SetPlayerInterior(playerid, 15);
   	GameTextForPlayer(playerid, "~w~] Welcome To The Car Show It Should Start Soon ]", 9000, 5);
   	ResetPlayerWeapons(playerid);
    BeginContestForPlayer(playerid);
 		if(GetPlayerState(playerid) == 2){
   	SetVehiclePos(GetPlayerVehicleID(playerid), -1345.6353,936.1618,1036.3716);
   	} else SetPlayerPos(playerid, -1345.6353,936.1618,1036.3716);
   	return 1;
  }
}
COMMAND:carshow(playerid,params[])
{
  #pragma unused params
  {
    for(new i = 0; i < MAX_PLAYERS; i++)
    carshow1[playerid] = 1;
   	GameTextForAll("There Is A Car Show Starting Soon /joincarshow costs $500 To Join!", 9000, 3);
	 	return 1;
  }
}
COMMAND:leavecarshow(playerid,params[])
{
  carshow1[playerid] = 0;
	SetPlayerPos(playerid, -517.054016,2266.15146,53.528297);
	SendClientMessage(playerid, blue, "You Have Left The Car Show ");
	SpawnPlayer(playerid);
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (newkeys & KEY_ANALOG_UP, playerid)
	{
	  hydrometer(playerid);
	}
	if (newkeys & KEY_ANALOG_DOWN, playerid)
	{
	  hydrometer(playerid);
	}
	if (newkeys & KEY_ANALOG_RIGHT, playerid)
	{
	  hydrometer(playerid);
	}
	if (newkeys & KEY_ANALOG_LEFT, playerid)
	{
	  hydrometer(playerid);
	}
	return 1;
}

stock BeginContestForPlayer(playerid)
{
  SendClientMessage(playerid, blue, "The contest is starting, Try And See How High You Can Bounce!");
  SetTimerEx("hydrometer", 5000, 0, "d", playerid);
  GameTextForPlayer(playerid, "Start Bouncing And See How High You Can Go", 4000, 5);
  return 1;
}
public hydrometer(playerid)
{
  GameTextForPlayer(playerid, "your bounce height is ", 4000, 5);
	return 1;
}
stock readhydros(vehicleid)
{
  
}
Reply
#2

all; i need is a idea to go from anyone?
Reply
#3

Reply
#4

is it that no one understnds what I wrote or just no one no`s?
Reply
#5

Sorry late
but why do you have
Код:
COMMAND:joincarshow(playerid,params[])


try
Код:
public joincarshow(playerid,params[])
Код:
public carshow(playerid,params[])
Код:
public leavecarshow(playerid,params[])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)