SA-MP Forums Archive
[HELP] Speedcheck and carcheck - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Speedcheck and carcheck (/showthread.php?tid=148536)



[HELP] Speedcheck and carcheck - WThieves - 17.05.2010

Hi there
i have a problem.

I have a bus i called XX.
then when this bus reaches 40 mph there should show up a text (doesnt matter what text).
And it should also set a checker that checks if the bus is below 40 mph.
Then when its below it should show a 3,2,1 blowup timer.
and if 0 is reached the car blows up, also when you get out of the car you should die immidiately.

I tried this but i couldt get it to work, i'd also like a place where you have to go somewhere in the north of LV, and if the bus gets there the bomb is disarmed.

If someone could give me a hint in all of this i would be thanking you :P.


Re: [HELP] Speedcheck and carcheck - WThieves - 17.05.2010

I can only come this far:
pawn Код:
public deadtrip()
{
if (what do i put here => 40mph[) && (the vehicle == XX)
{
SendClientMessage(playerid, COLOR_RED, "You reached deathspeed!, don't go any slower than 40 mph or you will DIE!");
So as you see i miss a lot and don't know the functions.


Re: [HELP] Speedcheck and carcheck - Jefff - 17.05.2010

Search GetPlayerSpeed

Init
Код:
SetTimer("deadtrip",1000,true);
Whatever
Код:
forward deadtrip();
public deadtrip()
{
	new Speed,Model,ID;
	for(new d,g=GetMaxPlayers(); d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d)) {
		if(!GetPlayerVehicleSeat(d)) {
			Speed = GetPlayerSpeed(d);
			ID = GetPlayerVehicleID(d);
			Model = GetVehicleModel(ID);
			if((Speed >= 40) && (Model == BUS_ID))
			{
				SendClientMessage(d, COLOR_RED, "You reached deathspeed!, don't go any slower than 40 mph or you will DIE!");
			}
		}
	}
	return true;
}



Re: [HELP] Speedcheck and carcheck - Steven82 - 18.05.2010

OFFTOPIC POST:


Lolz the movie speed plot except you lowered the speed


Re: [HELP] Speedcheck and carcheck - WThieves - 18.05.2010

Quote:
Originally Posted by Steven82
OFFTOPIC POST:


Lolz the movie speed plot except you lowered the speed
Exactly but what's the movies name, speed?


Re: [HELP] Speedcheck and carcheck - WThieves - 18.05.2010

Quote:
Originally Posted by Jefff
Search GetPlayerSpeed

Init
Код:
SetTimer("deadtrip",1000,true);
Whatever
Код:
forward deadtrip();
public deadtrip()
{
	new Speed,Model,ID;
	for(new d,g=GetMaxPlayers(); d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d)) {
		if(!GetPlayerVehicleSeat(d)) {
			Speed = GetPlayerSpeed(d);
			ID = GetPlayerVehicleID(d);
			Model = GetVehicleModel(ID);
			if((Speed >= 40) && (Model == BUS_ID))
			{
				SendClientMessage(d, COLOR_RED, "You reached deathspeed!, don't go any slower than 40 mph or you will DIE!");
			}
		}
	}
	return true;
}
What's with the npc?? and can i change BUS_ID to a certain one car only which i assigned a name to?
O and if you get lower than 40 mph on that speed you should blowup and if you get out you should die.


Re: [HELP] Speedcheck and carcheck - NewTorran - 18.05.2010

Quote:
Originally Posted by WThieves
Quote:
Originally Posted by Steven82
OFFTOPIC POST:


Lolz the movie speed plot except you lowered the speed
Exactly but what's the movies name, speed?
Idk if this is what you mean but ima guess XD

Title =
Speed

Desc =
Bus with a bomb and if it gets to 50mph its alright but if it goes the slighest bit lower it will blow up!


Re: [HELP] Speedcheck and carcheck - Steven82 - 18.05.2010

Yes exactly torran


Re: [HELP] Speedcheck and carcheck - WThieves - 18.05.2010

Quote:
Originally Posted by Jefff
Search GetPlayerSpeed

Init
Код:
SetTimer("deadtrip",1000,true);
Whatever
Код:
forward deadtrip();
public deadtrip()
{
	new Speed,Model,ID;
	for(new d,g=GetMaxPlayers(); d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d)) {
		if(!GetPlayerVehicleSeat(d)) {
			Speed = GetPlayerSpeed(d);
			ID = GetPlayerVehicleID(d);
			Model = GetVehicleModel(ID);
			if((Speed >= 40) && (Model == BUS_ID))
			{
				SendClientMessage(d, COLOR_RED, "You reached deathspeed!, don't go any slower than 40 mph or you will DIE!");
			}
		}
	}
	return true;
}
this isn't working sorry, can anyone help me out??