But i faced a problem and seems that when i enter the CELL it teleports me to somewhere else.
Код:
COMMAND:createcell(playerid, params[])
{
new Price, str[128];
if(PlayerStat[playerid][AdminLevel] < 5) return SendClientMessage(playerid, GREY, "You can't use this command.");
if(sscanf(params,"d", Price))return SendClientMessage(playerid, GREY, "USAGE: /createcell [price] (Stand up infron of the cell then use this command)");
if(Server[LoadedCells] > MAX_CELLS) return SendClientMessage(playerid, GREY, "You can't create cells anymore (Max Number of Cells is 100)");
new Float: PosX, Float: PosY, Float: PosZ;
GetPlayerPos(playerid, PosX, PosY, PosZ);
CreateCell(Price, PosX, PosY, PosZ, PosX -1.7, PosY, PosZ);
SendClientMessage(playerid, GREY, "You have successfully created a cell.");
format(str, sizeof(str), "Admin %s has created a new cell.", GetOOCName(playerid));
AdminActionLog(str);
return 1;
}
The cell is infront of you, Then you get inside by pressing F.