Jump to content
  • 0

Timer la comanda engine (refolosire la x secunde)


MAXYMUSS

Question

Problema intalnita (descriere): Vreau ca atunci cand apasa shift sa pot folosi iar comanda dupa 5  secunde , atunci cand apasa shift in joc imi ia comanda de cate ori apas si apare si scrisul : X roteste cheia in contactul vehiculului incercand sa porneasca motorul
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul:

    else if(PRESSED(KEY_JUMP))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
			if(IsPlayerConnected(playerid))
			{
                if(!engineOn[GetPlayerVehicleID(playerid)])
				{
				    new idcar = GetPlayerVehicleID(playerid);
		            if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
					if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
					if(IsARentableVeh(idcar))
					{
					    if(HireCar[playerid] != idcar) return 1;
					}
					if(IsAHarvest(idcar)) return 1;
					if(IsADrugHarvest(idcar)) return 1;
					if(IsASweeper(idcar)) return 1;
					if(IsASalesVehicle(idcar)) return 1;

					if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999)
	    			return SendClientMessage(playerid, COLOR_GREY,"* Nu aveti cheile masini!");
	    			
					new plname[MAX_PLAYER_NAME];
					GetPlayerName(playerid, plname, sizeof(plname));
					format(string, sizeof(string), "* %s roteste cheia in contactul vehiculului incercand sa porneasca motorul.", plname);
					ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
					if(PlayerInfo[playerid][pAdmin] < 1337 && PlayerInfo[playerid][pAdminDuty] == 1)
					{
					    SetTimerEx("StartingTheVehicle",1,0,"i",playerid);
					}
					else
					{
						SetTimerEx("StartingTheVehicle",3500,0,"i",playerid);
					}
					GameTextForPlayer(playerid, "~w~Starting vehicle engine...",3500,3);
					gEngine[playerid] = 1;
					new vid = GetPlayerVehicleID(playerid);
					new engine,lights,alarm,doors,bonnet,boot,objective;
					GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(vid,1,lights,alarm,doors,bonnet,boot,objective);
				//	engineOn[GetPlayerVehicleID(playerid)] = true;
					new y, m, d;
					new h,mi,s;
					getdate(y,m,d);
					gettime(h,mi,s);
					format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine",d,m,y,h,mi,s,sendername);
					CommandLog(string);
					return 1;
				}
			}
		}

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da

Edited by MAXYMUSS
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.