SA-MP Forums Archive
What's wrong with this code??! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What's wrong with this code??! (/showthread.php?tid=361395)



What's wrong with this code??! - Liepaajnieks - 20.07.2012

So, i train my low scripting skills on one of Raven's Gamemodes, i tryed create movable gates for Yamaguchi mafia and get failed..


Код:
else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
		{
			if (IsPlayerInRangeOfPoint(playerid, 15,785.09997558594,-1152.4000244141,25.299999237061))
			{
			    if(yamag == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
			   	MoveDynamicObject(yamaguchigates1,785.40002441406, -1162.9000244141, 25.39999961853, 3.5);
			   	SetTimer("GateCloseYama", 7000, 0);
		    	SendClientMessage(playerid, COLOR_BLUE,"The Yamaguchi gate Nr. 1 is opened and will close in 7 seconds.");
		     	GetPlayerName(playerid, sendername, sizeof(sendername));
		     	format(string, sizeof(string), "* %s takes his/her remote and opens the Yamaguchi gates #1.", sendername);
		      	ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
		      	yamag = 1;
            }
			else
			{
				SendClientMessage(playerid, COLOR_GREY,"* Not near a Gate that you can use.");
				return 1;
		    }
		}
All compiles without Errors and Warnings, BUT when i go in server and try my new gates, noone command works... i type /opengate /go /help /stats /s ALL and it says ''SERVER: Unknown Command'' wtf? what i do wrong with this code? i cant understand this ; ( p.s when i delete that code then all cmds works again..


Re: What's wrong with this code??! - Liepaajnieks - 21.07.2012

Help please? someone?


Re: What's wrong with this code??! - RedJohn - 21.07.2012

You are not using it as filterscript??


Re: What's wrong with this code??! - Rudy_ - 21.07.2012

check if there's return 0; somewhere in the "up and Middle" commands not last
and remove it


Re: What's wrong with this code??! - nepstep - 21.07.2012

Where do you put this code at? Show us the full code.


Re: What's wrong with this code??! - Liepaajnieks - 21.07.2012

I put it in Gamemode, near other gates what there was on orginal script, i just copy/paste one gates and change names to Yamaguchi, i create new gates and forward it how other gates, but still dont work,

HERE: http://imageshack.us/photo/my-images/269/36236190.png/ Is screenshot link, i screenshotted it because when i copy paste that code, it copyed wrongly. Where are this
Код:
if(!strcmp(cmdtext, "/go", true)) // By CuervO_NegrO-------------Gates system---------
there starts all gates system, its was in orginal script and it works.. i just copyed lspd gates script and tryed to create Yamaguchigates

EDIT: I use Raven's gamemode 4.2v
EDIT2: xD And if someone want explain me how fix this, then please in easily eng, because i dont understand all words in eng :P i also can give rep+, but u need to tell how to do that because i dont know xD


Re: What's wrong with this code??! - Liepaajnieks - 21.07.2012

someone please? ; (


Re: What's wrong with this code??! - Liepaajnieks - 22.07.2012

U didnt helped.. u just spamed ur topic.. that sucks hard