pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/open", true) == 0) { // Edit the /eup to your elevator command.
{ // Wtf is this, you put an open bracket in here ^^
MoveObject(LSPDGate,1592.5999755859,-1638.0615234375,12.37318611145,2.00); // Put your cords in here
SendClientMessage(playerid, 0xFFFFFFFF, "The gate is opening...."); // You dont alwas have to put this in, delete if wanted.
}
return 1; // return 1 after cmd is closed?
}
if(strcmp(cmdtext,"/close", true) == 0) { // Same deal as before
MoveObject(LSPDGate,1584.7800292969,-1638.0615234375,12.37318611145,2.00); // Same deal as before
SendClientMessage(playerid, 0xFFFFFFFF, "The gate is closeing."); // You dont alwas have to put this in, delete if wanted.
}
return 1; // returning 1 in onplayercommandtext ? WTF
}
FIXED version:
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
if ( strcmp( cmdtext,"/open", true ) == 0 )
{
MoveObject ( LSPDGate,1592.5999755859,-1638.0615234375,12.37318611145,2.00 );
SendClientMessage ( playerid, 0xFFFFFFFF, "The gate is opening...." );
return 1;
}
if ( strcmp( cmdtext,"/close", true ) == 0 )
{
MoveObject ( LSPDGate,1584.7800292969,-1638.0615234375,12.37318611145,2.00 );
SendClientMessage ( playerid, 0xFFFFFFFF, "The gate is closeing." );
return 1;
}
return 0; // MUST RETURN 0
}
ALSO: DINI is not a plugin!
That return 1 in OnPlayerCommandText made some conflicts, be careful what you return next time!