CMD:opencell(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new cell;
if(sscanf(params, "d", cell)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /opencell [cell 1 - 2]");
if(Faction[playerid] == 1 && IsPlayerInRangeOfPoint(playerid,10.0,312.42233, 325.14948, 1000.01660))
{
if(cell == 1)
{
MoveDynamicObject(celldoor1,312.42233, 325.14948, 1000.01660 -5,3.0,0,0,0);
SendClientMessage(playerid, COLOUR_GREY, "You have opened cell door 1.");
}
if(cell == 2)
{
MoveDynamicObject(celldoor2,312.41660, 321.08066, 1000.01660 -5,3.0,0,0,0);
SendClientMessage(playerid, COLOUR_GREY, "You have opened cell door 2.");
}
}
return 1;
}
celldoor1 = CreateDynamicObject(
celldoor2 = CreateDynamicObject(
celldoor1 = CreateDynamicObject(14856, 312.42233, 325.14948, 1000.01660, 0.00000, 0.00000, 90.00000);
celldoor2 = CreateDynamicObject(14856, 312.41660, 321.08066, 1000.01660, 0.00000, 0.00000, 90.00000);
if(Faction[playerid] == 1 && IsPlayerInRangeOfPoint(playerid,10.0,312.42233, 325.14948, 1000.01660))
|
Sorry you were correct, it was the line with the faction part, I apologise, thank you.
|
glad i could help.