03.04.2013, 22:01
I use the streamer but its not problem with the streamer its problem with barrier i put an barrier to lspd
it is working good but i put other in other place its not and not working good can you tell me how to add
barriers to work how to know which cords i need to add for up/down the barrier., i give you down some examples and also i give you code for the moveobject which i add in my gm.
1. The cords is from closed barrier which i create in map editor or mta..
2. Command:
3. This is the coord from closed barrier
4. The problem is with this barrierdjubretar its not working good also when i type /gate its not going up its going on other way. I never tryed to move the barriers i know with DestroyObject and Createobject but i didnt try with moveobject.
it is working good but i put other in other place its not and not working good can you tell me how to add
barriers to work how to know which cords i need to add for up/down the barrier., i give you down some examples and also i give you code for the moveobject which i add in my gm.
1. The cords is from closed barrier which i create in map editor or mta..
pawn Код:
CreateDynamicObject(968,1618.1999500,-1862.0000000,13.3000000,0.0000000,90.0000000,0.0000000); //object(barrierturn) (1)
pawn Код:
dcmd_gate(playerid,params[])
{
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
#pragma unused params
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 1544.7363,-1627.0232,13.3672)) // PD: Rampa
{
if(!NYPDBarrierStatus)
{
NYPDBarrierStatus = 1;
MoveDynamicObject(NYPDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646+0.0001, 0.0002, 0, 0, 90);
}
else
{
NYPDBarrierStatus = 0;
MoveDynamicObject(NYPDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646-0.0001, 0.0003, 0, 90, 90);
}
return 1;
}
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 1544.7363,-1627.0232,13.3672)) // Job: Oil Vozac
{
if(!OilStatus)
{
OilStatus = 1;
MoveDynamicObject(oilrampa, 2236.5000000, -2217.5996100, 13.3000000+0.0001, 0.0002, 0, 0, 90);
}
else
{
OilStatus = 0;
MoveDynamicObject(oilrampa, 2236.5000000, -2217.5996100, 13.3000000-0.0001, 0.0003, 0, 90, 90);
}
return 1;
}
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 25, 314.8011,-1638.1610,33.1386)) // FBI: Rampi (2)
{
if(!FBIStatus)
{
FBIStatus = 1;
MoveDynamicObject(fbirampa1, 313.1000100, -1642.1999500, 32.6000000+0.0001, 0.0002, 0, 90, 90); //1 - rampa
}
else
{
FBIStatus = 0;
MoveDynamicObject(fbirampa1, 313.1000100, -1642.1999500, 32.6000000-0.0001, 0.0003, 0, 90, 90);//2 - rampa
}
return 1;
}
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 1622.0492,-1862.5842,13.5469)) // Job: Djubretar
{
if(!DjubretarStatus)
{
DjubretarStatus = 1;
MoveDynamicObject(djubretar, 1618.1999500, -1862.00000005, 13.3000000+0.0001, 0.0002, 0, 90, 0);
}
else
{
DjubretarStatus = 0;
MoveDynamicObject(djubretar, 1618.1999500, -1862.00000005, 13.3000000-0.0001, 0.0003, 0, 0, 90);
}
return 1;
}
else SendClientMessage(playerid, COLOR_GREY, "You aren't near a gate you can open.");
return 1;
}
pawn Код:
djubretar = CreateDynamicObject(968, 1618.1999500, -1862.00000005, 13.3000000, 0.000000, 90, 0); // Job: Djubretar