Jump to content
  • 0

Question

Posted

Problema intalnita (descriere):salut,nu-mi merge comanda GATE.nu-i dau de cap,cand dau gate,nu merge.
Ero(area / rile) / warning-(ul / urile):Nu am.
Liniile de cod / sursa / script-ul(obligatoriu):CMD:gate(playerid, params[])

{
if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1544.6, -1630.8, 13.0)) switch(LSPDGates[0][1]) {
case 0: {
SetDynamicObjectRot(LSPDGates[0][0],0.0, 0, 90.0);
LSPDGates[0][1] = 1;
}
case 1: {
SetDynamicObjectRot(LSPDGates[0][0],0.0, 90.0, 90.0);
LSPDGates[0][1] = 0;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1589.19995117,-1637.98498535,14.69999981)) switch (LSPDGates[1][1]) {
case 0: {
MoveDynamicObject(LSPDGates[1][0] ,1589.19995117,-1637.98498535,9.69999981, 1.0);
LSPDGates[1][1] = 1;
PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
}
case 1: {
MoveDynamicObject(LSPDGates[1][0],1589.19995117,-1637.98498535,14.69999981, 1.0);
LSPDGates[1][1] = 0;
PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
}
}
}
return 1;
}

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:da,dar nu-i dau de cap ...

12 answers to this question

Recommended Posts

  • 0
Posted

eu zic ca e foarte incurcat acest gm.Unele is de forma CMD:comanda , si mai am si cateva comenzi STRCMP sau ceva de genu...cele cu cmd:(comanda) merg,iar cele STRCMP nu merg,sunt notate ceva gen /--------------STRCMP---------comenzi----

...Deci ...

  • 0
Posted

Schimbi tu coordonatele ...

Am testat comanda si la mine functioneaza!

CMD:gate(playerid, params[])
{
	if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
		if(IsPlayerInRangeOfPoint(playerid, 15.0, 1544.6, -1630.8, 13.0)) switch(LSPDGates[0][1]) {
			case 0: {
				SetDynamicObjectRot(LSPDGates[0][0],0.0, 0, 90.0);
				LSPDGates[0][1] = 1;
			}
			case 1: {
				SetDynamicObjectRot(LSPDGates[0][0],0.0, 90.0, 90.0);
				LSPDGates[0][1] = 0;
			}
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1589.19995117,-1637.98498535,14.69999981)) switch (LSPDGates[1][1]) {
			case 0: {
				MoveDynamicObject(LSPDGates[1][0] ,1589.19995117,-1637.98498535,9.69999981, 1.0);
				LSPDGates[1][1] = 1;
				PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
			}
			case 1: {
				MoveDynamicObject(LSPDGates[1][0],1589.19995117,-1637.98498535,14.69999981, 1.0);
				LSPDGates[1][1] = 0;
				PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
			}
		}
	}
	return 1;
}
  • 0
Posted

 

Schimbi tu coordonatele ...

Am testat comanda si la mine functioneaza!

CMD:gate(playerid, params[])
{
	if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
		if(IsPlayerInRangeOfPoint(playerid, 15.0, 1544.6, -1630.8, 13.0)) switch(LSPDGates[0][1]) {
			case 0: {
				SetDynamicObjectRot(LSPDGates[0][0],0.0, 0, 90.0);
				LSPDGates[0][1] = 1;
			}
			case 1: {
				SetDynamicObjectRot(LSPDGates[0][0],0.0, 90.0, 90.0);
				LSPDGates[0][1] = 0;
			}
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1589.19995117,-1637.98498535,14.69999981)) switch (LSPDGates[1][1]) {
			case 0: {
				MoveDynamicObject(LSPDGates[1][0] ,1589.19995117,-1637.98498535,9.69999981, 1.0);
				LSPDGates[1][1] = 1;
				PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
			}
			case 1: {
				MoveDynamicObject(LSPDGates[1][0],1589.19995117,-1637.98498535,14.69999981, 1.0);
				LSPDGates[1][1] = 0;
				PlayerPlaySoundEx(1035, 1589.19995117,-1637.98498535,14.69999981);
			}
		}
	}
	return 1;
}

Zice ca nu ii merge comanda cand tasteaza /gate pe server.

 

Incearca sa treci comanda de pe ZCMD pe STRCMP.

242086.png

  • 0
  • 0
Posted

Zice ca nu ii merge comanda cand tasteaza /gate pe server.

 

Incearca sa treci comanda de pe ZCMD pe STRCMP.

 

Am observat ca are baza de date la gamemode si de aceea i-am facut-o asa.

 

Sa incerce si asa :

if(strcmp(cmd, "/opengate", true) == 0 || strcmp(cmd, "/og", true) == 0)
    {
	    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        {
            if (PlayerToPoint(10.0, playerid, 1542.3541,-1627.5516,13.3828))
            {
		        SetObjectRot(barrierls, 0, 0, 270);
                SetTimer("GateTime" ,3000 ,false);
                SendClientMessage(playerid, COLOR_WHITE,"* Bariera a fost deschisa! Aceasta se va inchide in 3 secunde..");
                return 1;
            }
        }
        if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        {
            if (PlayerToPoint(10.0, playerid, 1589.0651,-1636.4768,13.4254))
            {
                MoveObject(garagels, 1588.3868,-1638.2165, -7, 5);
                SetTimer("GarageLS" ,3000 ,false);
                SendClientMessage(playerid, COLOR_WHITE,"* Poarta garajului a fost deschisa! Aceasta se va inchide in 3 secunde..");
                return 1;
            }
        }
        if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        {
            if(PlayerToPoint(10.0, playerid, 1636.5090,-1712.3145,13.2969))
            {
                SetObjectRot(barrierFBI, 0, 0, 270);
                SetTimer("BarrierFBI" ,3000 ,false);
                SendClientMessage(playerid, COLOR_WHITE,"* Bariera a fost deschisa! Aceasta se va inchide in 3 secunde..");
                return 1;
            }
		}
        if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
        {
            if(PlayerToPoint(10.0, playerid, 922.3271,-1221.6981,16.9766))
            {
                SetObjectRot(barrierTCC, 0, 0, 270);
                SetTimer("BarrierTCC" ,3000 ,false);
                SendClientMessage(playerid, COLOR_WHITE,"* Bariera a fost deschisa! Aceasta se va inchide in 3 secunde..");
                return 1;
            }
        }
        return 1;
    }

Dupa parerea , tot prima varianta este mai simpla.

  • 0
Posted
D:bra123gamemodesgmi.pwn(25483) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25485) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25487) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25492) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25495) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25497) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25502) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25505) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25507) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25512) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25515) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25517) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25522) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(25525) : error 010: invalid function or declaration
D:bra123gamemodesgmi.pwn(39546) : warning 203: symbol is never used: "LSPDGates"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Primesc erorile astea,am incercat ca tine,mr Andrei!

  • 0
Posted (edited)

Ce comanda ai folosit?

Uite :

 

Adaugi :

new LSPDGates[2][2]; // Boom gate, garage (1 = status, closed/open);

La publicul OnGamemodeInit adaugi :

	LSPDGates[1][0] = CreateDynamicObject(10184,1589.19995117,-1637.98498535,14.69999981,0.00000000,0.00000000,270.00000000, 0, 0, _, 200.0);

Am cercetat in Gamemode-ul meu , dar nu am gasit LSPDGates, imi poti arata toate liniile la care ai erori ? 

Am incercat sa iti rezolv erorile , insa nu sunt sigur ca e si bine.Nu am testat.Arata-mi liniile urmatoare:

(25483)
(25485)
(25487)
(25492) 
(25495) 
(25497)
(25502)
(25505)
(25507) 
(25512)
(25515)
(25517) 
(25522) 
(25525) 
(39546) 
Edited by MrAndrei
  • 0
Posted

post-10527-0-49712100-1424078743_thumb.ppost-10527-0-24898700-1424078733_thumb.p habar n-am de ce la 25483 este invalid,n-are treaba cu ./gate ,este comanda ./gungame . Randul 39546 este ultimul,si nu are nici pe departe treaba cu LSPD Gate.

la new am asa 

new LSPDObjs[8][3], LSPDGates[2][2];

si liniile sunt astfel:

 

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.