30.06.2015, 22:54
Ola tenho 1 portao e queria colocar a permissao... por exemplo somente o player Andelux possa abrir o portao, ta ai o code :
new portao; // CRIA A ARRAY portao
public OnGameModeInit()
{
portao = CreateObject(980, 1185.0000000, -1730.6000000, 15.3000000, 0.0000000, 0.0000000, 0.0000000); // CRIA O OBJETO E O DEFINE COMO portao
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/abrir", true) == 0)
{
MoveObject(portao, 1185.0000000, -1730.5999755859, 19.89999961853, 3.0); // MOVE O PORTAO PARA AS COORDENADAS X, Y, Z NA VELOCIDADE W
SendClientMessageToAll(0xFFFF00FF, "O portгo foi aberto !");
return 1;
}
if(strcmp(cmdtext, "/fechar", true) == 0)
{
MoveObject(portao, 1185.0000000, -1730.6000000, 15.3000000, 3.0); // MOVE O PORTAO PARA AS COORDENADAS X, Y, Z NA VELOCIDADE W
SendClientMessageToAll(0xFFFF00FF, "O portгo foi fechado !");
return 1;
}
return 0;
}
new portao; // CRIA A ARRAY portao
public OnGameModeInit()
{
portao = CreateObject(980, 1185.0000000, -1730.6000000, 15.3000000, 0.0000000, 0.0000000, 0.0000000); // CRIA O OBJETO E O DEFINE COMO portao
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/abrir", true) == 0)
{
MoveObject(portao, 1185.0000000, -1730.5999755859, 19.89999961853, 3.0); // MOVE O PORTAO PARA AS COORDENADAS X, Y, Z NA VELOCIDADE W
SendClientMessageToAll(0xFFFF00FF, "O portгo foi aberto !");
return 1;
}
if(strcmp(cmdtext, "/fechar", true) == 0)
{
MoveObject(portao, 1185.0000000, -1730.6000000, 15.3000000, 3.0); // MOVE O PORTAO PARA AS COORDENADAS X, Y, Z NA VELOCIDADE W
SendClientMessageToAll(0xFFFF00FF, "O portгo foi fechado !");
return 1;
}
return 0;
}