09.08.2010, 17:19
no topo do gm:
No public ongamemodeInt:
no public OnPlayerCommandText
Espero ter ajudado
pawn Code:
//
new portao1;
pawn Code:
//
public OnGameModeInit()
{
portao1 = CreateObject(980, -309.31048583984, 1322.5321044922, 56.019676208496, 0);
return 1;
}
pawn Code:
//
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/fechar-tpd", cmdtext, true, 10) == 0)
{
MoveObject(portao1, -309.31048583984, 1322.5321044922, 56.019676208496, 2.0);
SendClientMessage(playerid, 0xF60000AA, "Portao Estб Fechando.");
return 1;
}
if (strcmp("/abrir-tpd", cmdtext, true, 10) == 0)
{
MoveObject(portao1, -309.31048583984, 1322.5321044922, 50.269676208496, 2.0);
SendClientMessage(playerid, 0xF60000AA, "Portao Estб Abrindo.");
return 1;
}
}