/ramp sistēma

Gatavie pawn skripti atrodas šeit!

Moderator: Moderātori

Post Reply

Tevi pamierina samp.BoxG.lv web lapa?

5
50%
+/-
5
50%
 
Total votes: 10

fevelix
Jauniņais
Jauniņais
Posts: 6
Joined: 10 Feb 2011, 21:11

/ramp sistēma

Post by fevelix » 03 Aug 2013, 12:20

1). BoxG forumā nav iespējams kko atrast, jo nav Search sistēmas.
________________________________________________________________

Meklēju tramlīnu sistēmu..
Piem.
1.ievadot /ramp commandu, ieslēdz, izslēdz
2.Ja pēlētājs ir mašīnas vadītājs un piespiež LMB, jeb būtu labāk ja RMB parādītos priekšā tramplīns, kas pēc 3sec pazustu.

Esmu jau googlejis un nekas sakarīgs nav atrasts.

Man itkā 1 daļa ir gatava :

Code: Select all

public OnPlayerConnect(playerid)
{
	Player[playerid][pRamp] = 0;
	Player[playerid][pRampID] = 0;
	return 1;
}

CMD:ramp(playerid)
{
	if(Player[playerid][pLevel] < 2 || Player[playerid][pAdminLevel] < 1)
	    return SendClientMessage(playerid, S_cwarn, "System: Your level is incorrect for this command. For more information on /levels");

	if(Player[playerid][pRamp] == 0) {
        Player[playerid][pRamp] = 1;
        SendClientMessage(playerid, S_ok, "System: Ramping enabled");
	} else if(Player[playerid][pRamp] == 1) {
        Player[playerid][pRamp] = 0;
        SendClientMessage(playerid, S_ok, "System: Ramping disabled");
	}
	return 1;
}

User avatar
[AoD]Coyote
Nelabojams spameris
Nelabojams spameris
Posts: 1174
Joined: 12 Aug 2009, 12:19
Location: Compton

Re: /ramp sistēma

Post by [AoD]Coyote » 03 Aug 2013, 13:15

search.php

Where's problem?
Image

[BB]Chill
Censoņa
Censoņa
Posts: 367
Joined: 25 Jun 2012, 13:47
Location: Garāža
Contact:

Re: /ramp sistēma

Post by [BB]Chill » 03 Aug 2013, 14:24

[AoD]Coyote wrote:search.php

Where's problem?
Un kur to var atrast piemēram jauniņais? (spam)

fevelix
Jauniņais
Jauniņais
Posts: 6
Joined: 10 Feb 2011, 21:11

Re: /ramp sistēma

Post by fevelix » 03 Aug 2013, 14:53

[AoD]Coyote wrote:search.php

Where's problem?
Un kur es piem to linku varētu atrast, ja līdz šim nerinātu!? (headbang)

Un st.citu, izšārēju http://wiki.sa-mp.com/ un pats jau uzskriptoju!

Te būs skipts, ja nu kādam vaig!

Code: Select all

public OnPlayerConnect(playerid)
{
	Player[playerid][pRamp] = 0;
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	new Float:pX,Float:pY,Float:pZ,Float:vA, ramp, vehicle = GetPlayerVehicleID(playerid);
	if(Player[playerid][pRamp] == 1) {
		if (IsPlayerInAnyVehicle(playerid)) {
			if(newkeys & KEY_FIRE) {
                switch(GetVehicleModel(vehicle)) {
					case 609,608,601,595,593,592,590,588,583,582,578,577,574,572,570,569,564,
						563,557,556,553,552,548,545,544,539,538,537,532,531,530,528,525,
						524,520,519,515,514,513,512,511,508,501,499,498,497,493,488,487,
						486,485,484,483,482,478,476,473,472,471,470,469,465,464,462,460,
						459,457,456,455,454,453,452,449,448,447,446,444,443,442,441,440,
						437,433,432,431,430,428,427,425,424,423,417,416,414,413,409,408,
						407,406,403,400: return SendClientMessage(playerid, S_cwarn, "System: Ramp is not meant for this vehicle.");
				}
				GetVehiclePos(vehicle, pX, pY, pZ);
				GetVehicleZAngle(vehicle, vA);
				ramp = CreateObject(1655, pX + (20.0 * floatsin(-vA, degrees)), pY + (20.0 * floatcos(-vA, degrees)), pZ, 0, 0, vA);
				SetTimerEx("DestroyRamp", 3000, 0, "i", ramp);
			}
		}
	}
	return 1;
}
forward DestroyRamp(rampid);
public DestroyRamp(rampid)
{
	DestroyObject(rampid);
	return 1;
}

CMD:ramp(playerid)
{
	if(Player[playerid][pLevel] < 2 ) // Ja nu ir level sistēma un ir velme piešķirt commandu iekš to.
	    return SendClientMessage(playerid, S_cwarn, "System: Your level is incorrect for this command. For more information on /levels");

	if(Player[playerid][pRamp] == 0) {
        Player[playerid][pRamp] = 1;
        SendClientMessage(playerid, S_ok, "System: Ramping enabled");
	} else if(Player[playerid][pRamp] == 1) {
        Player[playerid][pRamp] = 0;
        SendClientMessage(playerid, S_ok, "System: Ramping disabled");
	}
	return 1;
}

Post Reply