02.09.2011, 17:41
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
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))
{
MoveObject(21, 2375.0532, -2646.1162, 12.6900, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2424.7588, -2416.4624, 12.2100, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora aberto :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
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))
{
MoveObject(21, 2375.20, -2657.95, 12.69, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
if(IsPlayerInRangeOfPoint(playerid, 20, 2375.20, -2657.95, 12.69))
{
MoveObject(12, 2416.79, -2424.33, 12.2, 2.0);
SendClientMessage(playerid, 0xFF8000FF, "O portгo esta agora fechado :D.");
}
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;
}
// ...........