03.09.2011, 02:08
Tente:
pawn Код:
//topo do FS
new portao;
new portao2;
new portao3;
//na public commandtext
{
if (strcmp("/abrirportao", cmdtext, true, 10) == 0)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp("[TB]", name, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao = MoveObject(21, 2375.0532, -2646.1162, 12.6900, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
else if (strcmp("abrirportao2", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao2 = MoveObject(12, 2424.7588, -2416.4624, 12.2100, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
else if (strcmp("abrirportao3", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao3 = MoveObject(57, 2376.3201, -2165.0100, 29.0662, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
}
return true;
}
if (strcmp("/fecharportao", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao = MoveObject(21, 2375.20, -2657.95, 12.69, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
else if (strcmp("/fecharportao2", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
portao2 = MoveObject(12, 2416.79, -2424.33, 12.2, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
else if (strcmp("/fecharportao3", cmdtext, true, 10) == 0)
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(57, 2376.32, -2165.01, 21.01, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo estб agora fechado :D.");
}
return true;
}
return false;
}