Help me with this gate!
#1

Can some one help me do a gang gate for Faction id 5 these are the object co.ordinates : please help me:

Closed:CreateObject(987, 1820.9423828125, -2007.2276611328, 12.554395675659, 0.000000, 0.000000, 0.000000); //

Open: CreateObject(987, 1820.8729248047, -2007.3715820313, 16.642910003662, 0.000000, 0.000000, 0.000000); //

I would like the command to be /opensurenosgate and /closesurenosgate
Reply
#2

Quote:
Originally Posted by Karl115
Can some one help me do a gang gate for Faction id 5 these are the object co.ordinates : please help me:

Closed:CreateObject(987, 1820.9423828125, -2007.2276611328, 12.554395675659, 0.000000, 0.000000, 0.000000); //

Open: CreateObject(987, 1820.8729248047, -2007.3715820313, 16.642910003662, 0.000000, 0.000000, 0.000000); //

I would like the command to be /opensurenosgate and /closesurenosgate
pawn Код:
new gate;

public OnGameModeInit( )
{
   gate = CreateObject( 987, 1820.9423828125, -2007.2276611328, 12.554395675659, 0.000000, 0.000000, 0.000000 ); //
   return true;
}

public OnPlayerCommantText( playerid, cmdtext[] )
{
   new string[ 256 ];
   new playermoney;
   new sendername[ MAX_PLAYER_NAME ];
   new giveplayer[ MAX_PLAYER_NAME ];
   new playername[ MAX_PLAYER_NAME ];
   new cmd[ 256 ];
   new tmp[ 256 ];
   new giveplayerid, moneys, idx;
   cmd = strtok( cmdtext, idx );
   if( strcmp( cmd,"/opensurenosgate",true ) == 0 )
   {
     MoveObject( gate, 1820.8729248047, -2007.3715820313, 16.642910003662 );
     return true;
   }
   if( strcmp( cmd,"/closesurenosgate",true ) == 0 )
   {
     MoveObject( gate, 820.9423828125, -2007.2276611328, 12.554395675659 );
     return true;
   }
   return false;
}
Reply
#3

Why all those 'new shitz[bla]' (Oversized strings ) if you're not gonna use them
Reply
#4

Dude i am putting them in the wrong section i think can u do // put it under Ongameint or some thing please i can't understand where i put the following codes
Reply
#5

pawn Код:
#include <a_samp>

new gate;

public OnGameModeInit( )
{
   gate = CreateObject( 987, 1820.9423828125, -2007.2276611328, 12.554395675659, 0.000000, 0.000000, 0.000000 ); //
   return true;
}

public OnPlayerCommantText( playerid, cmdtext[] )
{
   new cmd[ 256 ];
   cmd = strtok( cmdtext, idx );
   if( strcmp( cmd,"/opensurenosgate",true ) == 0 )
   {
     MoveObject( gate, 1820.8729248047, -2007.3715820313, 16.642910003662 );
     return true;
   }
   if( strcmp( cmd,"/closesurenosgate",true ) == 0 )
   {
     MoveObject( gate, 820.9423828125, -2007.2276611328, 12.554395675659 );
     return true;
   }
   return false;
}
Try using it like a filterscript.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)