Szerző Téma: Automatikus object  (Megtekintve 842 alkalommal)

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Automatikus object
« Dátum: 2016. Május 22. - 21:51:45 »
0
Sziasztok! Valaki megtudná nekem csinálni ezt:
 
#include <a_samp>
new
        ship1,
        ship2,
        ship3
;
new elevator;
public OnFilterScriptInit()
{
        print(\" \");
        print(\"**** Floating Admin Area filterscript loaded (By Kwarde) ****\");
        print(\" \");
        ship1 = CreateObject(10794, 3032.941895, -1855.616211, 3.840821, 0.0000, 0.0000, 0.0000);
        ship2 = CreateObject(10795, 3030.660156, -1855.546997, 13.947429, 0.0000, 0.0000, 0.0000);
        ship3 = CreateObject(10793, 2957.849121, -1855.491333, 32.335598, 0.0000, 0.0000, 0.0000);
        elevator = CreateObject(5837, 3172.162354, -2025.484619, 4.215692, 0.0000, 0.0000, 313.5904);
        return 1;
}
public OnRconCommand(cmd[])
{
        if(!strcmp(cmd, \"elore\", true)){
            MoveObject(ship1, 3283.209473, -1855.613281, 3.854892, 7);
            MoveObject(ship2, 3280.890137, -1855.675659, 13.944846, 7);
            MoveObject(ship3, 3207.841553, -1855.745605, 32.383705, 7);
            print(\"** Floating Admin Island: Ship moving to the Admin island\");
            return 1;
        }
        if(!strcmp(cmd, \"vissza\", true)){
            MoveObject(ship1, 3032.941895, -1855.616211, 3.840821, 7);
            MoveObject(ship2, 3030.660156, -1855.546997, 13.947429, 7);
            MoveObject(ship3, 2957.849121, -1855.491333, 32.335598, 7);
            print(\"** Floating Admin Island: Ship moving back to land [Los Santos]\");
            return 1;
        }
        return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
        if(!strcmp(cmdtext, \"/gotohajo\", true))
{
            if(IsPlayerAdmin(playerid)){
                if(IsPlayerInAnyVehicle(playerid)) SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                SetPlayerPos(playerid, 2845.966796,-1871.616455,11.101553);
                SetPlayerFacingAngle(playerid, 262.121154);
                return 1;
                }
        }
        return 0;
}

 
úgy hogy nem parancsal hanem pl 5 percenként megy egyikből a másikba

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Automatikus object
« Válasz #1 Dátum: 2016. Május 22. - 23:58:56 »
+1
#include <a_samp>
new hajo, ship1, ship2, ship3;
public OnFilterScriptInit() {
    ship1 = CreateObject(10794, 3032.941895, -1855.616211, 3.840821, 0.0000, 0.0000, 0.0000);
    ship2 = CreateObject(10795, 3030.660156, -1855.546997, 13.947429, 0.0000, 0.0000, 0.0000);
    ship3 = CreateObject(10793, 2957.849121, -1855.491333, 32.335598, 0.0000, 0.0000, 0.0000);
SetTimer(\"VisszaMennyeHajo\", 60000*5, true);
return 1;
}
forward VisszaMennyeHajo();
public VisszaMennyeHajo() {
    hajo = !hajo;
if(hajo) {
        MoveObject(ship1, 3283.209473, -1855.613281, 3.854892, 7);
        MoveObject(ship2, 3280.890137, -1855.675659, 13.944846, 7);
        MoveObject(ship3, 3207.841553, -1855.745605, 32.383705, 7);
}else{
        MoveObject(ship1, 3032.941895, -1855.616211, 3.840821, 7);
        MoveObject(ship2, 3030.660156, -1855.546997, 13.947429, 7);
        MoveObject(ship3, 2957.849121, -1855.491333, 32.335598, 7);
}
return 1;
}

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Automatikus object
« Válasz #2 Dátum: 2016. Május 23. - 06:27:55 »
0
Idézetet írta: Flαsн date=1463954336\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60537\" data-ipsquote-contentclass=\"forums_Topic

#include <a_samp>
new hajo, ship1, ship2, ship3;
public OnFilterScriptInit() {
    ship1 = CreateObject(10794, 3032.941895, -1855.616211, 3.840821, 0.0000, 0.0000, 0.0000);
    ship2 = CreateObject(10795, 3030.660156, -1855.546997, 13.947429, 0.0000, 0.0000, 0.0000);
    ship3 = CreateObject(10793, 2957.849121, -1855.491333, 32.335598, 0.0000, 0.0000, 0.0000);
SetTimer(\"VisszaMennyeHajo\", 60000*5, true);
return 1;
}
forward VisszaMennyeHajo();
public VisszaMennyeHajo() {
    hajo = !hajo;
if(hajo) {
        MoveObject(ship1, 3283.209473, -1855.613281, 3.854892, 7);
        MoveObject(ship2, 3280.890137, -1855.675659, 13.944846, 7);
        MoveObject(ship3, 3207.841553, -1855.745605, 32.383705, 7);
}else{
        MoveObject(ship1, 3032.941895, -1855.616211, 3.840821, 7);
        MoveObject(ship2, 3030.660156, -1855.546997, 13.947429, 7);
        MoveObject(ship3, 2957.849121, -1855.491333, 32.335598, 7);
}
return 1;
}

 

Köszi megy ment a + És még annyit hogy hogy jött ki a 5 perc? ha netán átakarom írni

Automatikus object
« Válasz #3 Dátum: 2016. Május 23. - 08:41:47 »
0
Idézetet írta: Sanyko date=1463977675\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60537\" data-ipsquote-contentclass=\"forums_Topic


 
#include <a_samp>
new hajo, ship1, ship2, ship3;
public OnFilterScriptInit() {
    ship1 = CreateObject(10794, 3032.941895, -1855.616211, 3.840821, 0.0000, 0.0000, 0.0000);
    ship2 = CreateObject(10795, 3030.660156, -1855.546997, 13.947429, 0.0000, 0.0000, 0.0000);
    ship3 = CreateObject(10793, 2957.849121, -1855.491333, 32.335598, 0.0000, 0.0000, 0.0000);
SetTimer(\"VisszaMennyeHajo\", 60000*5, true);
return 1;
}
forward VisszaMennyeHajo();
public VisszaMennyeHajo() {
    hajo = !hajo;
if(hajo) {
        MoveObject(ship1, 3283.209473, -1855.613281, 3.854892, 7);
        MoveObject(ship2, 3280.890137, -1855.675659, 13.944846, 7);
        MoveObject(ship3, 3207.841553, -1855.745605, 32.383705, 7);
}else{
        MoveObject(ship1, 3032.941895, -1855.616211, 3.840821, 7);
        MoveObject(ship2, 3030.660156, -1855.546997, 13.947429, 7);
        MoveObject(ship3, 2957.849121, -1855.491333, 32.335598, 7);
}
return 1;
}

 

Köszi megy ment a + És még annyit hogy hogy jött ki a 5 perc? ha netán átakarom írni
 
[/quote]
 
SetTimer(\"VisszaMennyeHajo\", 60000*5, true);

 
A 60000-et írd át. 1perc->60000 ezredmásodperc

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Automatikus object
« Válasz #4 Dátum: 2016. Május 23. - 08:48:35 »
0
Ha a 60000*5-ot atirom 60000*15 akkor 15percenkent megy ?

Automatikus object
« Válasz #5 Dátum: 2016. Május 23. - 09:16:32 »
0
Igen.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal