25.09.2013, 05:02
Well make sure you're following and do exactly and it should work.
Go to the top of your script where all your news and add the line below :
Go under OnGameModeInit and copy the line below :
The command to open the gates : /opengates
Go to the top of your script where all your news and add the line below :
pawn Код:
new
gate1,
gate22;
pawn Код:
gate1 = CreateDynamicObject(objectid,x,y,z,0.0000000,0.0000000,0.0000000); // x,y,z = where u want ur gate
gate2 = CreateDynamicObject(objectid,x,y,z,0.0000000,0.0000000,0.0000000); // x,y,z = where u want ur gate
pawn Код:
COMMAND:opengates(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,x,y,z)) // the cords of the gate what u putted under ongamemodeinit
{
MoveDynamicObject(gate1,x,y,z,0.50); // x,y,z = where u want it to move!
SendClientMessage(playerid, 0xFFFFFFFF, "gate has been opened");
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0,x,y,z)) x,y,z=cords of 2nd gate
{
MoveDynamicObject(gate2,x,y,z,0.50); // x,y,z = where u want it to move
SendClientMessage(playerid, 0xFFFFFFFF, "gate has been opened");
return 1;
}
}