27.01.2013, 20:46
ESTE ES EL CODIGO ENTERO QUE USO
if (strcmp(cmdtext, "/aplspd", true) == 0)//Porton police ls
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960))
{
MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.;
format(string, sizeof(string), "* %s Saca su control remoto del bolsillo y abre la reja", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
SetTimer("GateClose", 9000, 0);
return 1;
}
}
else return SendClientMessage(playerid, COLOR_GREY,"Usted no tiene un mando a distancia.");
return 1;
}
y para poner y mover los objetos uso esto
public GateClose(playerid)
{
MoveDynamicObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97,-1000.0, -1000.0, -1000.0);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
return 1;
pdgate1 = CreateDynamicObject(971,1589.053344,-1638.123168,14.122960,0.000000,0.000000,180);
if (strcmp(cmdtext, "/aplspd", true) == 0)//Porton police ls
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if (PlayerToPoint(10, playerid,1589.053344,-1638.123168,14.122960))
{
MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.;
format(string, sizeof(string), "* %s Saca su control remoto del bolsillo y abre la reja", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
SetTimer("GateClose", 9000, 0);
return 1;
}
}
else return SendClientMessage(playerid, COLOR_GREY,"Usted no tiene un mando a distancia.");
return 1;
}
y para poner y mover los objetos uso esto
public GateClose(playerid)
{
MoveDynamicObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97,-1000.0, -1000.0, -1000.0);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
return 1;
pdgate1 = CreateDynamicObject(971,1589.053344,-1638.123168,14.122960,0.000000,0.000000,180);