03.11.2015, 18:02
Hello Everyone i want to create a Function which checks that if a player is at land..
This is My command by which I can edit Land:
There at """"""" (red Colored) I want to create a Function which checks that if a player is in its land and if the player is not in land it should show player message that You are not in your Land, and if the player is in its land boundaries then it should allow player to edit land.
Necessary Info:
This is My command by which I can edit Land:
PHP код:
CMD:lands(playerid, params[])
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
for(new x; x < MAX_LANDS; x++)
{
if([COLOR=Red"]""""""""""[/COLOR](playerid, LandInfo[x][landZone]))
{
if(strcmp(playername, LandInfo[x][landOwner], true) == 0)
{
editingLand[playerid] = x;
break;
}
else
{
editingLand[playerid] = -1;
}
}
}
ShowPlayerDialogEx(playerid, LANDSMAIN,DIALOG_STYLE_LIST, "Lands - Select an option", "Toggle Lands on Map\nBuild\nEdit a Building\nDestroy a Building\nBuy Land\nSell Land\nDestroy all objects", "Select", "Cancel");
return 1;
}
Necessary Info:
Код:
Float: landMinX, Float: landMinY, Float: landMaxX, Float: landMaxY, landZone