Help me With 2 gate's please
#1

hey i placed 2
gate's and i want to make some command like /opengate
/closegate to open gate/ close gate
please i started scripting like 1 day ago could u guys make for me a good command make in command?

this CreateObject(5020, 2450.3513183594, -1675.4222412109, 14.183507919312, 0, 0, 312);
and this. CreateObject(10671, 2460.9345703125, -1659.2412109375, 14.169486999512, 0, 0, 357.99499511719);

please can u make a .pwn of this 2.? i will be fine if any help's me
Reply
#2

What? Ever Heard of "Pawn" compile button? Press F5 or compile to get .pwn file instantly.
Peace out.

This forum requires that you wait 120 seconds between posts. Please try again in 3 seconds.
Reply
#3

ehmm start by learning pawn, and by compiling you get the amx file.
on the wiki is one tutorial about gates
Reply
#4

open your script , Put those under {OnGamemodeinit}

https://sampwiki.blast.hk/wiki/CreateObject

And if you'd like to move them

https://sampwiki.blast.hk/wiki/MoveObject
Reply
#5

Quote:

if(strcmp(cmdtext, "/gdoor", true) == 0)
{
new string[50];
new movetime = MoveObject(5020, 2450.3513183594, -1675.4222412109, 14.183507919312, 2.00);
format(string, sizeof(string), "Object will finish moving in %d milliseconds", 14000);
SendClientMessage(playerid, 0xFF000000, string);
return 1;
}
return 0;
}
if(strcmp(cmdtext, "/gbigdoor", true) == 0)
{
new string[50];
new movetime = MoveObject(10671, 2460.9345703125, -1659.2412109375, 14.169486999512, 2.00);
format(string, sizeof(string), "Object will finish moving in %d milliseconds", 14000);
SendClientMessage(playerid, 0xFF000000, string);
return 1;
}
return 0;
}

i doesnt compile it says pawn


can any fix this for my? its just 2 gate's thats need be open with command please help me. i know this like's easy for you guys but im new its hard to me
Reply
#6

* remove return 0
* Add " new gate " in the top of the script
Reply
#7

C:\Documents and Settings\bunyamin\Bureaublad\Ultimate's Roleplay 0.3c\filterscripts\gangdoors.pwn(59) : error 030: compound statement not closed at the end of file (started at line 47) getting this error....

btw i made little like
Quote:

//=================================//
//Gang Door by Cristiano_Ronaldo =//
//=================================//
#include <a_samp>
new Gate;
new Gate2;

#define KEY_HORN 2
#define COLOR_YELLOW 0xFFFF00AA

#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Gangdoors Created by Cristiano_Ronaldo");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}
#else

main()
{

}

#endif

new obj; // Somewhere at the top of your script

public OnGameModeInit()
{
obj = CreateObject(5020, 2450.3513183594, -1675.4222412109, 14.183507919312, 0, 0, 312);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{


if (strcmp("/go", cmdtext, true, 10) == 0)
{
MoveObject(Gate, 2450.3513183594,-1675.4222412109,14.183507919312, 3);
SendClientMessage(playerid, 0xFFFF00AA,"The Gate is opened.Welcome!");
return 1;
}
if (strcmp("/gc", cmdtext, true, 10) == 0)
{
MoveObject(Gate, 2450.3513183594,-1675.4222412109,14.183507919312, 3);
SendClientMessage(playerid, 0xFFFF00AA,"The Gate is closed.bye bye!");
return 1;
}

Reply
#8

you need to add one bracket }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)