Szerző Téma: vkey  (Megtekintve 1196 alkalommal)

vkey
« Dátum: 2013. Április 02. - 19:36:23 »
0 Show voters
Sziasztok valaki tudna nekem csinálni egy vkeyt amiben a a bal Ctrl=autó gyorsítása a H=autó ugrása (felfelé)
és a 2(gomb)=autó javítása  ELÕRE IS KÖSZÖNÖM :D

vkey
« Válasz #1 Dátum: 2013. Április 05. - 17:31:48 »
+1 Show voters
Script tetejére:
 
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

 

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    if(PRESSED(KEY_SUB_MISSION))
    {
         if(IsPlayerInAnyVehicle(playerid))
         {
              new kocsi;
              kocsi = GetPlayerVehicleID(playerid);
              SetVehicleHealth(kocsi, 1000); //vagy 100...nem tudom mi is a max kocsi élet de azthiszem 1000
         }
     }
    if(PRESSED(KEY_HORN))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
             new kocsi;
             new float:x,y,z;
             kocsi = GetPlayerVehicleID(playerid);
             GetVehiclePos(kocsi, x, y, z);
             SetVehicleVelocity(kocsi, x, y, z+5);
        }
    }
    return 1;
}

 
Elõrefele nem tudom hogy kéne :/
« Utoljára szerkesztve: 2013. Április 05. - 17:34:54 írta Andris2120 »

Nem elérhető Live

  • 507
    • Profil megtekintése
vkey
« Válasz #2 Dátum: 2013. Április 05. - 21:10:26 »
+1 Show voters
Mód/Script tetejére:
 
#define PRESSED(%0) \\
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

 

new car;

 
Bárhova:
 
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if(PRESSED(KEY_SUB_MISSION)) {
if(IsPlayerInAnyVehicle(playerid)) {
   car = GetPlayerVehicleID(playerid);
   SetVehicleHealth(car, 1000);
}
}
if(PRESSED(KEY_HORN)) {
if(IsPlayerInAnyVehicle(playerid)) {
   new Float:x, y, z; car = GetPlayerVehicleID(playerid);
   GetVehiclePos(car, x, y, z);
   SetVehicleVelocity(car, x, y, z+5);
}
}
if(PRESSED(KEY_FIRE)) {
if(IsPlayerInAnyVehicle(playerid)) {
   new Float:x, y, z; car = GetPlayerVehicleID(playerid);
   GetVehicleVelocity(car, x, y, z);
   SetVehicleVelocity(car, x * 1.3, y *1.3, z * 1.3);
}
}
return 1;
}

 
LCTRL / LMB (Bal egér gomb) azaz tûz gombra raktam a SpeedBoostot
« Utoljára szerkesztve: 2013. Április 05. - 21:12:06 írta Live »

vkey
« Válasz #3 Dátum: 2013. Április 06. - 14:41:22 »
0 Show voters
Scriptek és pályáknál keress rá mert kadaradam-nak van egy elég jó kis vkey rendszere.

Nem elérhető Apple

vkey
« Válasz #4 Dátum: 2013. Április 06. - 14:47:21 »
0 Show voters

vkey
« Válasz #5 Dátum: 2013. Április 06. - 15:24:19 »
0 Show voters
Szntem a kadaradamos éri meg a legjobban! ;)

vkey
« Válasz #6 Dátum: 2013. Április 06. - 19:46:01 »
0 Show voters
Idézetet írta: _KaRi_ date=1365254659\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"35657\" data-ipsquote-contentclass=\"forums_Topic
Szntem a kadaradamos éri meg a legjobban! ;)
 
Ja,kezünkbe vehetjük a Xenon egy részét :)

Nem elérhető kos

  • 292
    • Profil megtekintése
vkey
« Válasz #7 Dátum: 2013. Április 06. - 21:20:08 »
0 Show voters
Hello!
Bocs hogy beleszólok, de hibás a script amit írtál neki Live.
 

            if(PRESSED(KEY_HORN)) {
                    if(IsPlayerInAnyVehicle(playerid)) {
                            new Float:x, y, z; car = GetPlayerVehicleID(playerid);
                            GetVehiclePos(car, x, y, z);
                            SetVehicleVelocity(car, x, y, z+5);
                    }
            }
 
[/quote]
Az y és z koordinátánál lehagytad a floatot.
Ugyanis warrningos lesz, ha kihagyja.
Helyesen:

if(PRESSED(KEY_HORN)) {
                    if(IsPlayerInAnyVehicle(playerid)) {
                            new Float:x, Float:y, Float:z; car = GetPlayerVehicleID(playerid);
                            GetVehiclePos(car, x, y, z);
                            SetVehicleVelocity(car, x, y, z+5);
                    }
            }

 
De szólj ha rosszul tudom.
Köszönöm figyelmedet!(javítottam)
« Utoljára szerkesztve: 2013. Április 06. - 23:24:08 írta kos »

vkey
« Válasz #8 Dátum: 2013. Április 06. - 22:09:41 »
0 Show voters
én valahogy nem találom a különbséget  :-[

vkey
« Válasz #9 Dátum: 2013. Április 07. - 00:29:38 »
0 Show voters
Köszönöm válaszaitokat :D :thumbsup:

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal