Jump to content

Move object


Guest Drifty

Recommended Posts

a jak to am udelat?

je to tady:

#include 
#include 
#include 
#include 
#include Pro_Colors
// This is a comment
// uncomment the line below if you want to write a filterscript
new brana;
new brana1;
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#if defined FILTERSCRIPT


#endif

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" BRANY k RF By MaTy ");
print("--------------------------------------\n");

//===================== BRANY ==================================================
brana = CreateObject(8948, -2113.2790527344, -232.20358276367, 36.518817901611);
brana1 = CreateObject(8948, -2122.51171875, -232.53520202637, 36.518817901611);

if (strcmp("/garazo", cmdtext, true) == 0)
{
MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348);
MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348);
return 1;
}

if (strcmp("/garazz", cmdtext, true) == 0)
{
MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611);
MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}

return 1;
}


public OnFilterScriptExit()
{
return 1;
}

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

if (strcmp("/garazo", cmdtext, true) == 0)
{
MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348);
MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348);
return 1;
}

if (strcmp("/garazz", cmdtext, true) == 0)
{
MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611);
MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}

 

to si dej do OnPlayerCommandtext

Link to comment
Share on other sites

Ok.. :d

 

-- stř 06. dub 2011 18:50:00 --

 

a ted to pise:

error 010: invalid function or declaration

mam to takhle

#include 
#include 
#include 
#include 
#include 
#include 
#include Pro_Colors
// This is a comment
// uncomment the line below if you want to write a filterscript
new brana;
new brana1;
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#if defined FILTERSCRIPT


#endif

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" BRANY k RF By MaTy ");
print("--------------------------------------\n");

brana = CreateObject(8948, -2113.2790527344, -232.20358276367, 36.518817901611);
brana1 = CreateObject(8948, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}
public OnPlayerCommandText();

if (strcmp("/garazo", cmdtext, true) == 0);
{
MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348);
MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348);
return 1;
}

if (strcmp("/garazz", cmdtext, true) == 0);
{
MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611);
MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}



public OnFilterScriptExit()
{
return 1;
}

Link to comment
Share on other sites

public OnPlayerCommandText(playerid,cmdtext){
if (strcmp("/garazo", cmdtext, true) == 0);{
MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348);
MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348);
return 1;}
if (strcmp("/garazz", cmdtext, true) == 0);{
MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611);
MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;}
return 0;}

Link to comment
Share on other sites

C:\Users\Maty\Desktop\BRANY k RF.pwn(28) : error 055: start of function body without function header

C:\Users\Maty\Desktop\BRANY k RF.pwn(29) : error 010: invalid function or declaration

C:\Users\Maty\Desktop\BRANY k RF.pwn(32) : error 010: invalid function or declaration

C:\Users\Maty\Desktop\BRANY k RF.pwn(33) : error 010: invalid function or declaration

C:\Users\Maty\Desktop\BRANY k RF.pwn(36) : error 010: invalid function or declaration

 

tak ja uz fakt nevim...

je to takhle:

#include 
#include 
#include 
#include 
#include 
#include 
#include Pro_Colors
// This is a comment
// uncomment the line below if you want to write a filterscript
new brana;
new brana1;
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#if defined FILTERSCRIPT


#endif

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" BRANY k RF By MaTy ");
print("--------------------------------------\n");

brana = CreateObject(8948, -2113.2790527344, -232.20358276367, 36.518817901611);
brana1 = CreateObject(8948, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}
public OnPlayerCommandText();{
if (strcmp("/garazo", cmdtext, true) == 0);{
MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348);
MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348);
return 1;}
if (strcmp("/garazz", cmdtext, true) == 0);{
MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611);
MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;}
return 0;}




public OnFilterScriptExit()
{
return 1;
}

Link to comment
Share on other sites

SAK JO... stejne to hazi :d to samy...

 

#include 
#include 
#include 
#include 
#include 
#include 
#include Pro_Colors
// This is a comment
// uncomment the line below if you want to write a filterscript
new brana;
new brana1;
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#if defined FILTERSCRIPT


#endif

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" BRANY k RF By MaTy ");
print("--------------------------------------\n");

brana = CreateObject(8948, -2113.2790527344, -232.20358276367, 36.518817901611);
brana1 = CreateObject(8948, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}

public OnPlayerCommandText(playerid,cmdtext);
{
if (strcmp("/garazo", cmdtext, true) == 0);
MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348);
MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348);
return 1;
}
if (strcmp("/garazz", cmdtext, true) == 0);
{
MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611);
MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611);
return 1;
}




public OnFilterScriptExit()
{
return 1;
}

Link to comment
Share on other sites

Tady to máš!

 

#include

new brana;

new brana1;

 

public OnFilterScriptInit()

{

print("\n--------------------------------------");

print(" BRANY k RF By MaTy ");

print("--------------------------------------\n");

brana = CreateObject(8948, -2113.2790527344, -232.20358276367, 36.518817901611,-2113.2790527344, -232.20358276367, 36.518817901611);

brana1 = CreateObject(8948, -2122.51171875, -232.53520202637, 36.518817901611, -2122.51171875, -232.53520202637, 36.518817901611);

return 1;

}

public OnFilterScriptExit()

{

return 1;

}

public OnPlayerCommandText(playerid, cmdtext[]);

{

if (strcmp("/garazo", cmdtext, true) == 0);

{

MoveObject(brana, -2108.541015625, -231.88584899902, 36.091590881348,3);

MoveObject(brana1, -2124.7546386719, -232.50280761719, 36.091590881348,3);

return 1;

}

if (strcmp("/garazz", cmdtext, true) == 0);

{

MoveObject(brana, -2113.2790527344, -232.20358276367, 36.518817901611,3);

MoveObject(brana1, -2122.51171875, -232.53520202637, 36.518817901611,3);

return 1;

}

return 0;

}

 

Co je Červeně ti chybělo

a to co je Zeleně zae přebejvalo

a eště ti tam přebějvalo ; atd.

 

Link to comment
Share on other sites

tak sem to poupravim ale hazi mi to furt to stejny...

Nuke porad pls...

 

#include 

// This is a comment
// uncomment the line below if you want to write a filterscript
new brana

#if defined FILTERSCRIPT

#endif

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" 82nd GATE By MaTy ");
print("--------------------------------------\n");

brana = CreateObject(971, -0.23098963499069, 2063.3933105469, 20.017778396606, -0.23098963499069, 2063.3933105469, 20.017778396606);

return 1;
}



public OnFilterScriptExit()
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gateo", cmdtext, true) == 0);
{
MoveObject(brana, -0.23098963499069, 2063.3933105469, 10.017778396606,3);
return 1;
}
if (strcmp("/gatec", cmdtext, true) == 0);
{
MoveObject(brana, -0.23098963499069, 2063.3933105469, 20.017778396606,3);
return 1;
}
return 0;
}


Link to comment
Share on other sites

tak ja sem si to opravil... procetl sme si to od Nukeho....

ale hazi mi to 3 errory

 

C:\Users\Maty\Desktop\82ndGate.pwn(11) : error 001: expected token: ";", but found "public"

C:\Users\Maty\Desktop\82ndGate.pwn(31) : error 036: empty statement

C:\Users\Maty\Desktop\82ndGate.pwn(36) : error 036: empty statement

 

-- čtv 07. dub 2011 18:38:36 --

 

já vím co to znamena, ale neumim to opravit

 

-- čtv 07. dub 2011 18:41:07 --

 

tak uz jen dva... rikaji: prazdny prikaz

 

-- čtv 07. dub 2011 18:43:03 --

 

a uz ZADNEJ ERR NEHAZI!!! PETR AP... ty si me vyprovokoval k tomu udelat si to sam :d diky... uz mi to de :)

Link to comment
Share on other sites

":lys4kcqs]Aha, někdo neumí číst a jen kopírovat.

Podívej se pořádně na to co psal Nuke místo toho abys tu brečel.

Jsem to tam dal schválně :d sem chtěl vidět o udělá :d

Link to comment
Share on other sites

jj... potom jak PERT_AP rekl abych nebrecel a cetl Poradne... tak sem si to zacal cist a koukal sem: tohle je zelene a tohle taky... to amm asi navic... a ja sem deb*l ja tam dal tohle a to tam prece nepatri :d Diky oboum moc :)

Link to comment
Share on other sites

  • 2 weeks later...

Jestli jěště nevíte udělejte to tak jako já a mně to funguje:

 

Nadefinujeme si objekt

new glob1;

 

V objektech si najdeme objekt který se dá posunout

CreateObject(980, 1067.0075683594, 1358.0748291016, 12.445266723633, 0, 0, 0);

 

Přepíšeme na

glob1 = CreateObject(980, 1067.0075683594, 1358.0748291016, 12.445266723633, 0, 0, 0);

 

A pak do public OnPlayerConnect(playerid) vytvoříme příkaz

if(!strcmp(cmdtext, "/garazo", true))
{
	if(!IsPlayerAdmin(playerid))
	{
		return SendClientMessage(playerid, 0xFF0000AA, "Musíš být RCON admin.");
	}
	MoveObject(glob1, 1047.052734375, 1338.1845703125, 7.6, 1.0);
	SendClientMessage(playerid, 0xFF0000AA, "Garáž je otevřená.");
	return 1;
}
if(!strcmp(cmdtext, "/garazz", true))
{
	if(!IsPlayerAdmin(playerid))
	{
		return SendClientMessage(playerid, 0xFF0000AA, "Musíš být RCON admin.");
	}
	MoveObject(glob1, 1047.052734375, 1338.1845703125, 12.018816947937, 1.0);
	SendClientMessage(playerid, 0xFF0000AA, "Garáž je zavřená.");
	return 1;
}

 

Podmínka pro RCON login - Pokud ji nachcete vymažte si ji

if(!IsPlayerAdmin(playerid))

 

To je vše :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...