SA-MP Forums Archive
Check if a player owns zone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Check if a player owns zone (/showthread.php?tid=594681)



Check if a player owns zone - Alpha000 - 21.11.2015

I want to check that if a player owns a land zone.... how can i do that i will provide the codes you need.


Re: Check if a player owns zone - MeCom - 21.11.2015

can you please
Quote:
Originally Posted by Alpha000
Посмотреть сообщение
provide the codes
of how player takes the zone


Re: Check if a player owns zone - Alpha000 - 22.11.2015

Oh i see thats also the problem how can player own zones any help with that cmd?


Re: Check if a player owns zone - AbyssMorgan - 22.11.2015

//edit:
PHP код:
LandInfo[x][landOwned]    - land accountid
PlayerAID
[playerid]     - player accountid
new bool:iszone falsemylandid = -1;
for(new 
xMAX_LANDSx++){
    if(
LandInfo[x][landOwned] == PlayerAID[playerid]){
        if(
IsPlayerInGangZone(playeridLandInfo[x][landZone])){
            
mylandid x;
            
iszone true;
            break;
        }
    }
}
if(
iszone){
    
SendClientMessage(playeridCOLOR_GREY"My Land");
} else {
    
SendClientMessage(playeridCOLOR_GREY"Not my land");




Re: Check if a player owns zone - Alpha000 - 22.11.2015

lemme see if this works i will reply as soon as i test it.


Re: Check if a player owns zone - Alpha000 - 22.11.2015

Deleted. Ill edit my code thanks for your help already +RPed