C:\Users\Davve\Desktop\Bases\Base1\NY.pwn(288) : error 017: undefined symbol "Gate" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
new Gate;
Gate = CreateObject(980,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000); //object(airportgate) (1) //closed gate
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open", cmdtext, true, 10) == 0)
{
CreateObject(980,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000); //object(airportgate) (1)
return 1;
} MoveObject(Gate,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000);
return 0;
}
#include < a_samp >
// Rest of includes
// Global
new Gate;
// Callbacks
public OnGameModeInit( )
{
Gate = CreateObject(980,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000); //object(airportgate) (1) //closed gate
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open", cmdtext, true, 10) == 0)
{
CreateObject(980,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000); //object(airportgate) (1)
MoveObject(Gate,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000);
return 1;
}
return 0;
}
#include < a_samp >
new Gate;
public OnGameModeInit( )
{
Gate = CreateObject( 980, -967.79998779, 2715.10009766, 52.29999924, 0.00000000, 0.00000000, 277.50000000 ); //object(airportgate) (1) //closed gate
return 1;
}
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
if( !strcmp( cmdtext, "/open", true ) )
{
MoveObject( Gate, -967.79998779, 2715.10009766, 52.29999924, 0.00000000, 0.00000000, 277.50000000 );
return 1;
}
return 0;
}
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
CreateObject(980,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000); //object(airportgate) (1)
return 1;
} MoveObject(Gate,-967.79998779,2715.10009766,52.29999924,0.00000000,0.00000000,277.50000000);
return 0;
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
if( !strcmp( cmdtext, "/open", true ) )
{
MoveObject( Gate, -967.79998779, 2715.10009766, 52.29999924, 0.00000000, 0.00000000, 277.50000000 );
return 1;
}
return 0;
}
pawn Код:
So for your CMD Use this pawn Код:
|
@davve
You already created the object OnGameModeInit Callback. All you have to do is to MoveObject by a command and not create again the object |