22.11.2013, 04:56
in my rp gamemode,for lspd faction there is a garage gate,when i go there and do /gate there it says you are not near a gate,all the other gates works but the garage ones doesnt work my code is:
if(strcmp(cmdtext, "/gate", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,9,1588.91, -1637.63, 13.44))
{ //POLICE GATE
if(!IsACop(playerid) && !IsAnAgent(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not a Cop / FBI / SAST !");
if(pdgategar==0)
{
pdgategar = 1;
MoveDynamicObject(pdgaragegateobj, 1588.6501464844, -1638.0750732422, 6.2343215942383, 0);
}
else if(pdgategar==1)
{
pdgategar = 0;
MoveDynamicObject(pdgaragegateobj, 1588.6428222656, -1638.02734375, 15.240161895752, 0);
}
}
if(strcmp(cmdtext, "/gate", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,9,1588.91, -1637.63, 13.44))
{ //POLICE GATE
if(!IsACop(playerid) && !IsAnAgent(playerid)) return SendClientMessage(playerid,COLOR_GREY," You are not a Cop / FBI / SAST !");
if(pdgategar==0)
{
pdgategar = 1;
MoveDynamicObject(pdgaragegateobj, 1588.6501464844, -1638.0750732422, 6.2343215942383, 0);
}
else if(pdgategar==1)
{
pdgategar = 0;
MoveDynamicObject(pdgaragegateobj, 1588.6428222656, -1638.02734375, 15.240161895752, 0);
}
}