Jump to content

Question

Posted

salut,as vrea sa ma ajutati si pe mine...am comanda /veh engine si de fiecare data cand intri intr-o masina trebuie sa o folosesti.As vrea totusi ca in loc sa o scri sa fie blindata pe 2(cand apas 2 sa se porteasca singur motorul).Ma puteti ajuta?

Multumesc anticipat

9 answers to this question

Recommended Posts

Posted

Nu cred ca poti pe butonu 2 deoarece singurele butoanele stiu ca doar SHIFT,ENTER,SPACE si F pot fi folosite dupa cate stiu eu :-? Dar cauta un FS de engine cu shift cum ti-am zis stiu ca sunt foarte multe :-? poate stie cineva cum faci cu 2  eu chiar nu stiu eu zic ca e mai bine cu shift :P

Posted

http://wiki.sa-mp.com/wiki/OnPlayerKeyStateChange

http://wiki.sa-mp.com/wiki/GetPlayerKeys - Sunt aici alea pe care sa apesi.

Faci la OnPlayerKeyStateChange asa:

if(newkeys & KEY_SUBMISSION)
{
    //aici codul de la /veh engine pornire
}

Posted

/************************************|
|          Vehicle control           |
|              By XpLoR              |
*************************************/

#include <a_samp>
#include < zcmd >

new EngineStatus[MAX_PLAYERS], LightsStatus[MAX_PLAYERS], AlarmStatus[MAX_PLAYERS], DoorsStatus[MAX_PLAYERS], BonnetStatus[MAX_PLAYERS], BootStatus[MAX_PLAYERS], ObjectiveStatus[MAX_PLAYERS];

public OnFilterScriptInit()
{
	print("-------------------");
	print("- Vehicle Control -");
	print("-------------------");
	ManualVehicleEngineAndLights();
	return 1;
}

CMD:veh(playerid, params[])
{
	new engine,lights,alarm,doors,bonnet,boot,objective;
    new veh = GetPlayerVehicleID(playerid);
	if(strcmp(params, "Engine", true) == 0)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
	 		if(2 != INVALID_VEHICLE_ID)
			{
				if(EngineStatus[playerid] == 0)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
					EngineStatus[playerid] = 1;
					SendClientMessage(playerid, 0xFFFFFFAA, "{FFFFFF}Ai {6EF83C}pornit {FFFFFF} motorul {C3C3C3}");
				}
				else if(EngineStatus[playerid] == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
					EngineStatus[playerid] = 0;
					SendClientMessage(playerid, 0xFFFFFFAA, "{FFFFFF}Ai {F81414}oprit {FFFFFF}motorul {C3C3C3}!");
				}
			}
		}
		else {
		SendClientMessage(playerid, 0x00FF00FF, "{F81414}Nu esti intr-o masina!");
		}

asta este /veh engine tot nu prea am inteles te rog sa ma ajuti!

Posted

La OnPlayerKeyStateChange in GM pui asa:

if(newkeys & KEY_SUBMISSION)
{
	new veh = GetPlayerVehicleID(playerid);
	new engine,lights,alarm,doors,bonnet,boot,objective;
	GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
	if(engine == VEHICLE_PARAMS_OFF)
	{
		SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
		EngineStatus[playerid] = 1;
		SendClientMessage(playerid, 0xFFFFFFAA, "{FFFFFF}Ai {6EF83C}pornit {FFFFFF} motorul {C3C3C3}");
	}
}

Posted

if (newkeys == KEY_SPRINT)//PRESS "W"

    {

        OnPlayerCommandText(playerid,"/veh engine");

    }

cred ca-i asa incearca....

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Guest RockStar
Posted

if (newkeys == KEY_SPRINT)//PRESS "W"

    {

        OnPlayerCommandText(playerid,"/veh engine");

    }

Doamnee...o prostie mai mare nu puteai sa zici :))

ON : Fa cum a zis stuntman ar trebui sa mearga , poate ai facut tu ceva gresit...

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.