SA-MP Forums Archive
How can i make? - 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: How can i make? (/showthread.php?tid=483607)



How can i make? - OnY - 26.12.2013

EDITE,T/C PLEASE


Re: How can i make? - OnY - 27.12.2013

Anyone ?


Re: How can i make? - Hansrutger - 27.12.2013



Sorry I just had to call in my ьber-powerful paintskills ^. I suggest you wiki-search it and learn a bit about it. You'll probably figure it by that point. :P I'll make an example soon, just have to change computer.

EDIT: here it is:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (((newkeys & KEY_LEFT) && !(oldkeys KEY_LEFT)) && IsPlayerInDealership(playerid))
    {
        //Make previous model appear
    }
    else if (((newkeys & KEY_RIGHT) && !(oldkeys KEY_RIGHT)) && IsPlayerInDealership(playerid))
    {
        //Make next vehicle model appear
    }
    return 1;
}

//or-------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(IsPlayerInDealership(playerid))
        if (((newkeys & KEY_LEFT) && !(oldkeys KEY_LEFT)))
        {
            //Make previous model appear
        }
        else if (((newkeys & KEY_RIGHT) && !(oldkeys KEY_RIGHT)))
        {
            //Make next vehicle model appear
        }
    }
    return 1;
}
You have to make your own IfPlayerIsInDealership or whatever, that you make somehow when a player has pressed the command to go to view the car models, the player will send a variable or something that the player is there. A stock for instance.


Re: How can i make? - OnY - 27.12.2013

Ok..i want to make a catalog..not to buy..
So,when a player enter in a range..and type /catalog to show the cars..

How can i make this ? And where is //Make previous model appear what i need to put ?

I wanna make this command,/catalog for :

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(IsPlayerInDealership(playerid))
        if (((newkeys & KEY_LEFT) && !(oldkeys KEY_LEFT)))
        {
            //Make previous model appear
        }
        else if (((newkeys & KEY_RIGHT) && !(oldkeys KEY_RIGHT)))
        {
            //Make next vehicle model appear
        }
    }
    return 1;
}
How can i make with that IFPLAYERINDEALERSHIP


Re: How can i make? - OnY - 27.12.2013

Anyone ? Sorry for double post but in this night i need urgent this for update..