LSPD skin selection problem
#1

Hello. I have a problem with LSPD skin selection. I don't have a code. I want to make a police skin selection at LSPD lockers, so when the players enter the command, they will be able to choose a police skin, but I don't know how to do it. (I am a little new in scripting). Somene have any ideas?
Reply
#2

You will need to make a dialog when they are near the locker, let's say something like this:
pawn Code:
// the command to be performed
CMD:locker(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] == LSPD)// u would of course have to put the cmd for cops only so change this to whatever suits your script
    {
        if(!IsPlayerInRangeOfPoint(playerid, 5, x,y,z) return SendClientMessage(playerid, -1, "You are not at the closet, nigga!");// u put the coordinates of the locker
        else
        {
        ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "Choose a skin!", "Skin1\nSkin2\nSkin3", "Choose", "Close!");
        }
    else return SendClientMessage(playerid, -1, "You need to be in the LSPD to use this!");
return 1;
}


//now on dialog response
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)
{
    if(listitem == 0)
    {
    SetPlayerSkin(playerid, SkinID1);
    SendClientMessage(playerid, -1, "Enjoy your new uniform!");
    }
    if(listitem == 1)
    {
    SetPlayerSkin(playerid, SkinID2);
    SendClientMessage(playerid, -1, "Enjoy your new uniform!");
    }
    if(listitem == 2)
    {
    SetPlayerSkin(playerid, SkinID3);
    SendClientMessage(playerid, -1, "Enjoy your new uniform!");
    }
}
I made this for you really simple, so I hope it helps you, and edit it to what your script looks like
Reply
#3

Quote:
Originally Posted by JimmyCh
View Post
You will need to make a dialog when they are near the locker, let's say something like this:
pawn Code:
// the command to be performed
CMD:locker(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] == LSPD)// u would of course have to put the cmd for cops only so change this to whatever suits your script
    {
        if(!IsPlayerInRangeOfPoint(playerid, 5, x,y,z) return SendClientMessage(playerid, -1, "You are not at the closet, nigga!");// u put the coordinates of the locker
        else
        {
        ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "Choose a skin!", "Skin1\nSkin2\nSkin3", "Choose", "Close!");
        }
    else return SendClientMessage(playerid, -1, "You need to be in the LSPD to use this!");
return 1;
}


//now on dialog response
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)
{
    if(listitem == 0)
    {
    SetPlayerSkin(playerid, SkinID1);
    SendClientMessage(playerid, -1, "Enjoy your new uniform!");
    }
    if(listitem == 1)
    {
    SetPlayerSkin(playerid, SkinID2);
    SendClientMessage(playerid, -1, "Enjoy your new uniform!");
    }
    if(listitem == 2)
    {
    SetPlayerSkin(playerid, SkinID3);
    SendClientMessage(playerid, -1, "Enjoy your new uniform!");
    }
}
I made this for you really simple, so I hope it helps you, and edit it to what your script looks like
Thanks, it works.
Reply
#4

No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)