07.11.2015, 05:42
Hello everyone.
First here is my code :
Okay now as you can see in my code IF the player is in its land it should show him "you are in land"
and IF the player is not in land it should show him that "you are NOT in your land"
BUT when i type /lands in game it says "you are NOT in your land" also with this it shows me the dialog as /lands...
any help please [+REP]
First here is my code :
PHP код:
CMD:lands(playerid, params[])
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
for(new x; x < MAX_LANDS; x++)
{
if (PlayerInfo[playerid][pLandPerms] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own any land.");
if(IsPlayerInGangZone(playerid, LandInfo[x][landZone]))
return SendClientMessage(playerid, COLOR_GREY, "You are in your land.");
else SendClientMessage(playerid, COLOR_GREY, "You are not in your land.");
{
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;
}
and IF the player is not in land it should show him that "you are NOT in your land"
BUT when i type /lands in game it says "you are NOT in your land" also with this it shows me the dialog as /lands...
any help please [+REP]