[POMOC] Engine

Započeo Danisha, Avgust 28, 2013, 20:18:05 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Ravens
Detaljan opis problema: Napravio sam novi engine sytem ali sve je uredu do jedne stvari posto se motor i moze upaliti i na /engine i na SHIFT ali sada se nesto pobrkalo i nece na SHIFT nego na slovo S a u skripti je sve uredu ne znam do cega je jel mozda neko od vas zna
Dio skripte: ////
Neke slike/video za lakse dobivanje pomoci(neobavezno): ////

Od kada ti se pobrkalo?
Å to si radio u skripti?
[TuT]-Vozila na posebnog igrača- http://balkan-samp.com/forum/index.php?topic=78806.0 | [FS]-G.P.S- http://balkan-samp.com/forum/index.php?topic=73768.0
[FS]-Rcon Panel- http://balkan-samp.com/forum/index.php?topic=72595.0 | [GM]-Division Street(stari)- http://balkan-samp.com/forum/index.php?topic=78810.0
Citat: magarac poslato Avgust 28, 2013, 18:58:01 POSLE PODNE
Ma jbt ne zelim ja to...... koji k ce mi takva camera di trci okolo......

<script type="text/javascript">
var bannersnack_embed = {"hash":"bxui659h2","width":400,"height":130,"t":1421676936,"userId":16712396,"bgcolor":"#3D3D3D","wmode":"opaque"};
</script>
<script type="text/javascript" src="http://files.bannersnack.com/iframe/embed.js"></script>

Od danas kako sam napravio umesto starog ravens systema ja sam sredio da mi se pali ovako

GetVehicleParamsEx(idcar, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(idcar, 1, lights, alarm, doors, bonnet, boot, objective);

i dodao sam ono ManualVehicleEngineAndLights(); pod ongamemodeinit

Citat: Danisha poslato Avgust 28, 2013, 20:22:19 POSLE PODNE
Od danas kako sam napravio umesto starog ravens systema ja sam sredio da mi se pali ovako

GetVehicleParamsEx(idcar, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(idcar, 1, lights, alarm, doors, bonnet, boot, objective);

i dodao sam ono ManualVehicleEngineAndLights(); pod ongamemodeinit

ÄŒudno,daj mi taj svoj dio di se pali na SHIFT
[TuT]-Vozila na posebnog igrača- http://balkan-samp.com/forum/index.php?topic=78806.0 | [FS]-G.P.S- http://balkan-samp.com/forum/index.php?topic=73768.0
[FS]-Rcon Panel- http://balkan-samp.com/forum/index.php?topic=72595.0 | [GM]-Division Street(stari)- http://balkan-samp.com/forum/index.php?topic=78810.0
Citat: magarac poslato Avgust 28, 2013, 18:58:01 POSLE PODNE
Ma jbt ne zelim ja to...... koji k ce mi takva camera di trci okolo......

<script type="text/javascript">
var bannersnack_embed = {"hash":"bxui659h2","width":400,"height":130,"t":1421676936,"userId":16712396,"bgcolor":"#3D3D3D","wmode":"opaque"};
</script>
<script type="text/javascript" src="http://files.bannersnack.com/iframe/embed.js"></script>

else if(PRESSED(KEY_JUMP))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
if(IsPlayerConnected(playerid))
{
    if(VoziloJePokrenuto[GetPlayerVehicleID(playerid)] == 0)
{
    new idcar = GetPlayerVehicleID(playerid);
    if(gEngine[playerid] == 1) { return 1; }
            if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(pveh == 510 || pveh == 481 || pveh == 509) return 1;
if(IsARentableCar(idcar) || IsARentableBike(idcar))
{
    if(HireCar[playerid] != idcar) return 1;
}
new Float:health;
GetVehicleHealth(idcar, health);
if(isrefuelling[playerid] == 1) return SCM(playerid, COLOR_WHITE, "Ne mozete upaliti motor jer sipate gorivo!");
if(health <= 350) return SCM(playerid, COLOR_GREY, "Vas motor je unisten, pozovite mehanicara! /call 555");
if(Gas[idcar] == 0) return SCM(playerid, COLOR_GREY, "Vas rezervoar je prazan, pozovite mehanicara! /call 555");
if(IsAnOwnableCar(idcar))
{
if(CarInfo[idcar][cKazna] == 1 && (PlayerInfo[playerid][pClan] != 17 || PlayerInfo[playerid][pLider] != 17))
{
SCM(playerid, COLOR_LIGHTRED, "Morate platiti kaznu za parking da bi mogli uzmeti vase vozilo! (/platikaznu)");
return 1;
}
}
if(IsASalesCar(idcar)) return 1;
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "* %s okrece kljuc i pokusava da upali motor.", plname);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
if(PlayerInfo[playerid][pAdmin] < 1337 && PlayerInfo[playerid][pAdminDuznost] == 1 || PlayerInfo[playerid][pAdmin] >= 1338)
{
    SetTimerEx("StartingTheVehicle", 1, 0, "i", playerid);
}
else
{
SetTimerEx("StartingTheVehicle", 3500, 0, "i", playerid);
}
GameTextForPlayer(playerid, "~w~Pokretanje motora vozila...", 3500, 3);
gEngine[playerid] = 1;
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,plname);
CommandLog(string);
return 1;
}
}
}
    }

Izvinjavam se zbog DP-a ali ovo mi je hitno jel zna ko???

Ne znam,kako hoces ali po meni je glupo da igrac pali motor na sift,kucanjem komande /engine je vise prikladnije po meni a i nije toliko tesko za napisati....
Ja sam doradjivao taj engine system i napravio sam /aengine i /engine,kada sedis u autu nisi zamrznut mozes gledati levo desno i ako se auto ne pomera i motor je ugasen.
Skripta cita kljuceve vozila iz vozacevog statsa i samo ta vozila dozvoljava za upaliti,znaci ako nije tvoj ne mozes ga startati.
aengine dozvoljava adminu da startuje bilo koji automobil jer ne cita kljuceve iz statsa.
Nadam se da ce ti pomoci

if(!strcmp(cmd, "/engine", true))               // Original by Raven,edited by Niko
{
    if(IsPlayerInAnyVehicle(playerid))
        {
    new carid = GetPlayerVehicleID(playerid)
    if(CarInfo[carid][cBrokeVehicle] == 0)
    {
    if(!engineOn[GetPlayerVehicleID(playerid)])
{
new idcar1 = GetPlayerVehicleID(playerid);
            if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(idcar1 == 510 || idcar1 == 462 || idcar1 == 481 || idcar1 == 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,"* You cannot turn this car's engine!");

new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "The Driver spins the key of his car and Starts the engine.");
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
if(PlayerInfo[playerid][pAdmin] < 1336 && PlayerInfo[playerid][pAdminDuty] == 1)
{
    SetTimerEx("StartingTheVehicle",1,0,"i",playerid);
}
else
{
SetTimerEx("StartingTheVehicle",1,0,"i",playerid);
}
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,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
engineOn[GetPlayerVehicleID(playerid)] = true; //// 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;
}
else if(engineOn[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(IsASalesVehicle(idcar))
{
    if(HireCar[playerid] != idcar) return 1;
}
if(IsAHarvest(idcar)) return 1;
if(IsADrugHarvest(idcar)) return 1;
if(IsASweeper(idcar)) return 1;
if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999)
return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!");
format(string, sizeof(string), "The Driver spins a key and turns off the engine", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
gEngine[playerid] = 0;
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
                GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
engineOn[GetPlayerVehicleID(playerid)] = false;
TogglePlayerControllable(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;
}
    }
else
{
    SendClientMessage(playerid, COLOR_GREY, "Your vehicle engine is broken, call a mechanic!");
}
}
    return 1;
}
if(strcmp(cmd, "/aengine", true) == 0)        //Added by Niko
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vid = GetPlayerVehicleID(playerid);
engineOn[GetPlayerVehicleID(playerid)] = true;
TogglePlayerControllable(playerid, true);
GetPlayerName(playerid, sendername, sizeof(sendername));
new engine,lights,alarm,doors,bonnet,boot,objective;
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
format(string, sizeof(string), "* Vehicle engine starts for Admin(( %s )).", sendername);
ProxDetector(30.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
gEngine[playerid] = 0;
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "You are not in any vehicle!");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!");
    return 1;
}
}
return 1;
}


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.