SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/07/2013, 01:13 PM   #1
Edward2013
Little Clucker
 
Join Date: Jun 2013
Posts: 19
Reputation: 0
Default LSPD skin selection problem

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?
Edward2013 is offline   Reply With Quote
Old 20/07/2013, 01:31 PM   #2
JimmyCh
Gangsta
 
JimmyCh's Avatar
 
Join Date: Mar 2013
Location: LB
Posts: 653
Reputation: 62
Default Re: LSPD skin selection problem

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
__________________

Left SA-MP, you can always find me on Steam playing CS:GO though
http://steamcommunity.com/profiles/76561198173703259/ OR
http://steamcommunity.com/id/grizzlyjim/
Skype: jimmycherfan
JimmyCh is offline   Reply With Quote
Old 20/07/2013, 02:31 PM   #3
Edward2013
Little Clucker
 
Join Date: Jun 2013
Posts: 19
Reputation: 0
Default Re: LSPD skin selection problem

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.
Edward2013 is offline   Reply With Quote
Old 20/07/2013, 02:33 PM   #4
JimmyCh
Gangsta
 
JimmyCh's Avatar
 
Join Date: Mar 2013
Location: LB
Posts: 653
Reputation: 62
Default Re: LSPD skin selection problem

No problem
__________________

Left SA-MP, you can always find me on Steam playing CS:GO though
http://steamcommunity.com/profiles/76561198173703259/ OR
http://steamcommunity.com/id/grizzlyjim/
Skype: jimmycherfan
JimmyCh is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Music in Skin Selection Problem JoshP Scripting Help 6 15/06/2013 08:34 PM
Skin selection problem. SpeAroX Scripting Help 0 04/11/2012 05:48 PM
Skin selection WoozieŽ Scripting Help 0 05/08/2012 04:17 PM
Skin selection problem k3nw00d_kri5ty Scripting Help 6 11/01/2012 07:49 AM
Yellow Going in Icons and Skin checker for Lspd Car Masterakio Help Archive 10 27/04/2010 04:51 PM


All times are GMT. The time now is 08:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.