Hello guys, i've scripted this but for some reason it's not working in game, can i have some help?
Код:
if(strcmp(cmdtext, "/door", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,3.0 ,127.2629,1123.8804,527.4631))
{ //POLICE DOOR 1
if(!IsACop(playerid)&& !IsAnAgent(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not a Cop / FBI / SAST !");
if(pddoor1==0)
{
pddoor1 = 1;
SetObjectRot( pddoor1obj, 0.0000, 0.0000, -90.0000);
SetObjectPos( pddoor1obj, 126.5166, 1123.2622, 526.4631 );
}
else if(pddoor1==1)
{
pddoor1 = 0;
SetObjectRot( pddoor1obj, 0.0000, 0.0000, 0.0000);
SetObjectPos( pddoor1obj, 126.5166, 1123.2622, 526.4631 );
}
}
if(IsPlayerInRangeOfPoint(playerid,3.0 ,127.26232, 1083.36389, 522.89319))
{ //POLICE DOOR 2
if(!IsACop(playerid) && !IsAnAgent(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not a Cop / FBI / SAST !");
if(pddoor2==0)
{
pddoor2 = 1;
SetObjectRot( pddoor2obj, 0.0000, 0.0000, -180.0000);
SetObjectPos( pddoor2obj, 127.2283, 1084.8819, 522.8932 );
}
else if(pddoor2==1)
{
pddoor2 = 0;
SetObjectRot( pddoor2obj, 0.0000, 0.0000, -90.0000);
SetObjectPos( pddoor2obj, 127.2283, 1084.8819, 522.8932 );
}
}
return 1;
}
One of the variables is the problem, check if you set the variables all right.