24.07.2011, 17:17
i have a command to move a gate:
how can i modify that to only move in a certain radius?
Код:
CMD:gopen(playerid, params[])
{
if(INI_Open(getINI(playerid)))
{
PlayerInfo[playerid][Faction] = INI_ReadInt("Faction");
PlayerInfo[playerid][Factionrank] = INI_ReadInt("Factionrank");
//LSPDFACTION
if(PlayerInfo[playerid][Faction] == LSPD)
{
if(PlayerInfo[playerid][Factionrank] > 0)//Any rank
{
if(!isnull(params))
{
return SendClientMessage(playerid,SYellow,"Usage: /gate.");
}
else
{
SendClientMessage(playerid,SYellow,"The Lspd Garage gate is now opening.");
return MoveObject(lspdgaragegate, 1596.90, -1637.94, 16.00, 4.0);
}
}
return SendClientMessage(playerid,SYellow,"You must be atlest rank 1 LSPD to use this.");
}//RANK 1 END
else
{
return SendClientMessage(playerid,SYellow,"You must be LSPD to use that command.");
}
}
return 0;
}

