24.10.2012, 04:49
Hey Guys.. !!
I need to make a gate and added the following commands.. !
Under
Added this
Then i added the commands
But Still i cant see the gate or the commands.. !!
I need to make a gate and added the following commands.. !
pawn Код:
#include <a_samp>
new gate1;
new gate2;
new gate3;
new gate4;
new gate5;
pawn Код:
public OnFilterScriptInit()
{
pawn Код:
gate1 = CreateObject(975, -2531.17, 3195.20, 2.17, 0.00, 0.00, 0.51);
gate2 = CreateObject(975, -2552.60, 3194.95, 2.06, 0.00, 0.00, 0.51);
gate3 = CreateObject(975, -2541.06, 3195.32, 2.06, 0.00, 0.00, 0.51);
gate4 = CreateObject(975, -2532.44, 3195.32, 2.17, 0.00, 0.00, 0.51);
gate5 = CreateObject(975, -2549.66, 3195.20, 2.06, 0.00, 0.00, 0.51);
return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/openag", true)){
if(IsPlayerInRangeOfPoint(playerid, -2534.4148,3141.7007,1.2366,357.2968))
{
MoveObject(gate1,-2552.60, 3194.95, -1.13, 0.00, 0.00, 0.51);
MoveObject(gate2,-2531.17, 3195.20, -1.20, 0.00, 0.00, 0.51);
MoveObject(gate3,-2541.06, 3195.32, -1.43, 0.00, 0.00, 0.51);
MoveObject(gate4,-2532.44, 3195.32, -1.20, 0.00, 0.00, 0.51);
MoveObject(gate5,-2549.66, 3195.20, -1.21, 0.00, 0.00, 0.51);
return 1;
}
}
else if(strcmp(cmdtext, "/closeag", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, 0, 0, 0)){
MoveObject(gate1, 975, -2531.17, 3195.20, 2.17, 0.00, 0.00, 0.51);
MoveObject(gate2,975, -2552.60, 3194.95, 2.06, 0.00, 0.00, 0.51);
MoveObject(gate3,975, -2541.06, 3195.32, 2.06, 0.00, 0.00, 0.51);
MoveObject(gate4,975, -2532.44, 3195.32, 2.17, 0.00, 0.00, 0.51);
MoveObject(gate5,975, -2549.66, 3195.20, 2.06, 0.00, 0.00, 0.51);
return 1;
}
}
return 0;
}