27.06.2012, 11:56
can anyone help me out in this small script
its a moving object script
scripts are working fine
but in game when i type cmd object is opening and closing in diffrnt rotation
this is the scripts
this two are the obejects
i made script for two objects to move in one cmd like two gates opening or sliding from center to left/right
this is closed gate. gate0 and gate1
this is open gate gate0, gate1
ok this is what happens first the two objects are in the place where i wanted ie rotation 58 and 233.
now am trying to /open now the objects i.e gates open but the object rotation changes ex: if its in 58 and 233 when i use cmd it changes to 95 and 180
but it is closing and opening just that obeject is in difrnt rotation
hope i explained detail
can anyone help me out ?
its a moving object script
scripts are working fine
but in game when i type cmd object is opening and closing in diffrnt rotation
this is the scripts
PHP Code:
#include <a_samp>
#include <streamer>
#define COLOR_GREEN 0xFF8000FF
new gate0;
new gate1;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Multiple Gates ");
print("--------------------------------------\n");
gate0 = CreateDynamicObject(2988,-1892.30004883,2191.50000000,3.480000010,0.00000000,0.00000000,58.00000000); //object(comp_wood_gate) (1)
gate1 = CreateDynamicObject(2988,-1885.40002441,2186.80004883,3.48000010,0.00000000,0.00000000,233.50000000); //object(comp_wood_gate) (2)
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/openg", true))
{
MoveDynamicObject(gate0, -1895.80004883,2193.80004883,3.48000010, 1); //object(comp_wood_gate) (1)
MoveDynamicObject(gate1, -1882.09997559,2184.50000000,3.48000010, 1);
SendClientMessage(playerid, 0xFF8000FF, "The gate is opening close it right after you enterd!");
return 1;
}
if(!strcmp(cmdtext, "/closeg", true))
{
MoveDynamicObject(gate0, -1892.30004883,2191.50000000,3.480000101, 1 );
MoveDynamicObject(gate1, -1885.40002441,2186.80004883,3.480000101, 1 );
SendClientMessage(playerid, 0xFF8000FF, "The gate is closing!");
return 1;
}
return 0;
}
i made script for two objects to move in one cmd like two gates opening or sliding from center to left/right
this is closed gate. gate0 and gate1
PHP Code:
CreateObject(2988,-1892.30004883,2191.50000000,3.40000010,0.00000000,0.00000000,58.00000000); //object(comp_wood_gate) (1)
CreateObject(2988,-1885.40002441,2186.80004883,3.40000010,0.00000000,0.00000000,233.50000000); //object(comp_wood_gate) (2)
PHP Code:
CreateObject(2988,-1895.80004883,2193.80004883,3.40000010,0.00000000,0.00000000,58.00000000); //object(comp_wood_gate) (1)
CreateObject(2988,-1882.09997559,2184.50000000,3.40000010,0.00000000,0.00000000,233.50000000); //object(comp_wood_gate) (2)
now am trying to /open now the objects i.e gates open but the object rotation changes ex: if its in 58 and 233 when i use cmd it changes to 95 and 180
but it is closing and opening just that obeject is in difrnt rotation
hope i explained detail
can anyone help me out ?