11.10.2008, 16:47
I've had a few requests on how to add the damn thing into the gf. It's pritty simple. I'll try tell you how and keep it short at the same time.
Now, at the top of the script, where all you 'new' things are, add the following.
Now, under your 'OnGameModeInit' add the following:
Now all we need are the commands. Under your 'OnPlayerCommandText' add the following:
If you still can't do it then add my msn: removed
Now, at the top of the script, where all you 'new' things are, add the following.
pawn Код:
new LSPDBarrier1;
new LSPDGate1;
new SFPDBarrier1;
new SFPDBarrier2;
new SFPDGate1;
new LVPDBarrier1;
new LVPDGate1;
new LVPDGate2;
Now, under your 'OnGameModeInit' add the following:
pawn Код:
CreateObject(995,1544.841674,-1633.573242,13.244799,90.000000,0.000000,271.012207); // LSPDBlock1
CreateObject(994,1544.860107,-1617.647216,12.537019,-1.000000,0.000000,269.168762); // LSPDBlock2
CreateObject(971,-1636.529296,688.580444,9.389122,0.000000,0.000000,358.653167); // SFPDBlock1
LSPDBarrier1 = CreateObject(968,1544.755004,-1623.929199,13.352820,0.000000,89.000000,269.818847);
LSPDGate1 = CreateObject(980,1588.265991,-1638.143554,15.014236,0.000000,0.000000,0.675605);
SFPDBarrier1 = CreateObject(968,-1572.275878,665.800231,7.037499,0.000000,-89.000000,91.176780);
SFPDBarrier2 = CreateObject(968,-1701.454101,680.673767,24.857488,0.000000,-89.000000,269.939086);
SFPDGate1 = CreateObject(971,-1627.696777,688.464660,9.414549,0.000000,0.000000,-0.333460);
LVPDBarrier1 = CreateObject(968,2238.143554,2457.357910,10.833136,0.000000,89.000000,271.965820);
LVPDGate1 = CreateObject(980,2293.974853,2497.135498,4.561177,0.000000,0.000000,91.243118);
LVPDGate2 = CreateObject(980,2335.075195,2443.761474,7.144308,0.000000,0.000000,241.384170);
Now all we need are the commands. Under your 'OnPlayerCommandText' add the following:
pawn Код:
if(strcmp(cmd, "/LSPDBarrier1open", true) == 0) // Command
{
if(IsACop(playerid)) // Checks if the player is in the police
{
SetObjectRot(LSPDBarrier1,0.000000,0.000000,269.818847); // Moves the object
}
}
if(strcmp(cmd, "/LSPDBarrier1close", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(LSPDBarrier1,0.000000,89.000000,269.818847);
}
}
if(strcmp(cmd, "/LSPDGate1open", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(LSPDGate1, 1588.265991,-1638.143554,9.534472,0.4);
}
}
if(strcmp(cmd, "/LSPDGate1close", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(LSPDGate1, 1588.265991,-1638.143554,15.014236,0.4);
}
}
if(strcmp(cmd, "/SFPDBarrier1open", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(SFPDBarrier1,0.000000,-1.000000,91.176780);
}
}
if(strcmp(cmd, "/SFPDBarrier1close", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(SFPDBarrier1,0.000000,-89.000000,91.176780);
}
}
if(strcmp(cmd, "/SFPDBarrier2open", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(SFPDBarrier2,0.000000,-1.000000,269.939086);
}
}
if(strcmp(cmd, "/SFPDBarrier2close", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(SFPDBarrier2,0.000000,-89.000000,269.939086);
}
}
if(strcmp(cmd, "/SFPDGate1open", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(SFPDGate1, -1627.696777,688.464660,14.599885,0.4);
}
}
if(strcmp(cmd, "/SFPDGate1close", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(SFPDGate1, -1627.696777,688.464660,9.414549,0.4);
}
}
if(strcmp(cmd, "/LVPDBarrier1open", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(LVPDBarrier1, 0.000000,-1.000000,271.965820);
}
}
if(strcmp(cmd, "/LVPDBarrier1close", true) == 0)
{
if(IsACop(playerid))
{
SetObjectRot(LVPDBarrier1, 0.000000,89.000000,271.965820);
}
}
if(strcmp(cmd, "/LVPDGate1open", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(LVPDGate1, 2293.974853,2497.135498,10.055157,0.4);
}
}
if(strcmp(cmd, "/LVPDGate1close", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(LVPDGate1, 2293.974853,2497.135498,4.561177,0.4);
}
}
if(strcmp(cmd, "/LVPDGate2open", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(LVPDGate2, 2335.075439,2443.761474,12.621609,0.4);
}
}
if(strcmp(cmd, "/LVPDGate2close", true) == 0)
{
if(IsACop(playerid))
{
MoveObject(LVPDGate2, 2335.075195,2443.761474,7.144308,0.4);
}
}

