31.05.2011, 22:41
pawn Код:
//Topo GM
new PortaoDeLicencas;
forward PortaoLicencas(playerid);
//OnGameModeInit
PortaoDeLicencas = CreateDynamicObject(969,1413.13378906,276.82910156,18.55468750,0.00000000,0.00000000,313.74755859); //Fechado
if(!strcmp(cmdtext, "/abrirportao", true)) // para o instrutor
{
if(PlayerInfo[playerid][pLeader] == 11)
{
if (PlayerToPoint(15, playerid,1413.13378906,276.82910156,18.55468750)) //local onde pode usar o comando
{
MoveDynamicObject(PortaoDeLicencas,1419.46032715,270.71334839,18.55468750, 0.8); //cordenadas portao aberto
SetTimer("PortaoLicencas", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE,"A garagem foi aberta e serб fechada em 7 segundos.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s abre o portгo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerPlaySound(playerid, 1153, 1413.13378906,276.82910156,18.55468750);
return 1;
}
return 1;
}
return 1;
}