21.12.2010, 19:37
pawn Код:
//No Topo do GM
new Pcorrida;
forward Pcorrida1();
pawn Код:
Pcorrida = CreateObject(980, 1868.310913, -2493.508545, 20.882156, 0.000000, 0.000000, 88.000000); //primero
pawn Код:
public Pcorrida1()
{
MoveObject(Pcorrida,1868.310913, -2493.508545, 20.882156, 3);//Cordenadas Portao fechado
return 1;
}
pawn Код:
if(strcmp(cmdtext, "/pcorrida", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] > 1 && PlayerToPoint(30.0, playerid, 1868.310913, -2493.508545, 20.882156)) { //Cordenadas portao fechado
MoveObject( Pcorrida,1868.356323, -2493.523438, 15.328079,3);//cordenadas portao aberto
GetPlayerName(playerid, sendername, sizeof(sendername));
new string [256];
format(string, sizeof(string), "* %s Abriu Este Portao!", sendername);
ProxDetector(4.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(playerid, "~g~Aberto", 5000, 3);
SetTimer("Pcorrida1", 5000, false);//settimer que fecha portao
} else {
SendClientMessage(playerid, COLOR_RED, "*** Voce nao esta perto do portao ou nao e ADM***");
}
return 1;
}