[Help] Opening Gate = House Owner
#1

Hello, i want to make house owner's to open the gate... i have now for Player Name example:

Код:
YCMD:test(playerid,params[],help)
{
    #pragma unused help
    #pragma unused params
    if(!strcmp(PlayerName(playerid),"Test",true))
{
	if(PlayerToPoint(25.0, playerid,334.6119080,-2217.3454590,0))
{
	MoveDynamicObject(TestGate,334.6119080,-2217.3454590,0,3);
}
}
	else
{
	SCM(playerid,Red,"  [!]");
}
	return 1;
}
In house enum i have

HouseInfo[idhouse][kOwnerName] is checking PlayerName
Reply
#2

Are those gates specifically for houses or what?
Reply
#3

Yes i have few houses for specific players, but if they change name i must change in script every time, so i want to do to gate open to the house owner or house ID...
Reply
#4

You could try something like that:

PHP код:
YCMD:test(playerid,params[],help)
{
    
#pragma unused help
    #pragma unused params
    
if(PlayerToPoint(25.0playeridHOUSE_GATE_COORDS...))
    {
        if(!
strcmp(HouseInfo[HOUSE_ID][kOwnerName],PlayerName(playerid),true))
        {
            
MoveDynamicObject(HOUSE_GATE_OBJECT_ID...);
        }
        else
        {
            
SCM(playeridRed"[!]");
        }
    }
    return 
1;

Reply
#5

will try, thanks... if i stuck i post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)