FireFighter
#1

Okay i started scripting this and there is a problem in OnDialogResponse :/

when i write /ffighter it gives Unknown Command and then it gives FireFighter Job and gives dialog but response is not working

i got another script Similar it is a GunShop but that works


The Code :/
Код:
#pragma tabsize 0

#include <a_samp>
#include <zcmd>

#define FILTERSCRIPT

#define COLOR_LIME   0x00FF00FF
#define COLOR_RED    0xFF0000FF
#define COLOR_CYAN   0x00FFFFFF
#define COLOR_ORANGE 0xFFA500FF

#define FIREFIGHTER_DIALOG 21

CMD:firefighter(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"FireFighter Job");
ShowPlayerDialog(playerid,FIREFIGHTER_DIALOG, DIALOG_STYLE_LIST, "FireFighters!", " Fighter No.1\n Fighter No.2\n Fighter No.3","Set","Cancel");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 21)
{
if(listitem == 0)
{
GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 277);
}
if(listitem == 1)
{
GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 278);
}
if(listitem == 2)
{
GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 279);
}
}
return 1;
}
Reply
#2

Quote:
Originally Posted by Riper97
Посмотреть сообщение
Okay i started scripting this and there is a problem in OnDialogResponse :/

when i write /ffighter it gives Unknown Command and then it gives FireFighter Job and gives dialog but response is not working

pawn Код:
CMD:firefighter(playerid, params[])
Try using /firefighter Instead of /ffighter
Reply
#3

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 21)
    {
        if(response)
        {
            if(listitem == 0)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 277);
            }
            if(listitem == 1)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 278);
            }
            if(listitem == 2)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 279);
            }
        }
    }
    return 1;
}
pawn Код:
CMD:firefighter(playerid, params[])
{
    SendClientMessage(playerid,COLOR_RED,"FireFighter Job");
    ShowPlayerDialog(playerid,FIREFIGHTER_DIALOG, DIALOG_STYLE_LIST, "FireFighters!", " Fighter No.1\n Fighter No.2\n Fighter No.3","Set","Cancel");
    return 1;
}
Reply
#4

EDIT: Guy Above beat me to the chase
pawn Код:
blic OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 21)
    {
        if(response)
        {
            if(listitem == 0)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 277);
            }
            if(listitem == 1)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 278);
            }
            if(listitem == 2)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 279);
            }
        }
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
EDIT: Guy Above beat me to the chase
I knew someone would post, so I posted the strick minimum, then I edited the full codes.
Reply
#6

Quote:
Originally Posted by [MM]18240[FMB]
Посмотреть сообщение
Try using /firefighter Instead of /ffighter
That Wouldn't change anything
Reply
#7

Quote:
Originally Posted by lelemaster
Посмотреть сообщение
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 21)
    {
        if(response)
        {
            if(listitem == 0)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 277);
            }
            if(listitem == 1)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 278);
            }
            if(listitem == 2)
            {
                GetPlayerSkin(playerid);
                SetPlayerSkin(playerid, 279);
            }
        }
    }
    return 1;
}
pawn Код:
CMD:firefighter(playerid, params[])
{
    SendClientMessage(playerid,COLOR_RED,"FireFighter Job");
    ShowPlayerDialog(playerid,FIREFIGHTER_DIALOG, DIALOG_STYLE_LIST, "FireFighters!", " Fighter No.1\n Fighter No.2\n Fighter No.3","Set","Cancel");
    return 1;
}
Thanks For Your Help And Thanks To Everyone that replied
Reply
#8

NO NO NO STILL THE SAME PROBLEM IT DOESN"T CHANGE THE SKIN
Reply
#9

its not necessary get the player's skin to set it, this should work. if this it's not working, there is something interfering.

pawn Код:
#include <a_samp>
#include <zcmd>

#define FILTERSCRIPT
#define COLOR_LIME   0x00FF00FF
#define COLOR_RED    0xFF0000FF
#define COLOR_CYAN   0x00FFFFFF
#define COLOR_ORANGE 0xFFA500FF

#define FIREFIGHTER_DIALOG 21

CMD:firefighter(playerid, params[])
{
    SendClientMessage(playerid,COLOR_RED,"FireFighter Job");
    return ShowPlayerDialog(playerid,FIREFIGHTER_DIALOG, DIALOG_STYLE_LIST, "FireFighters!", "Fighter No.1\nFighter No.2\nFighterNo.3","Set","Cancel");
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == FIREFIGHTER_DIALOG) {
        if(listitem == 0) {
            return SetPlayerSkin(playerid, 277);
        }
        if(listitem == 1) {
            return SetPlayerSkin(playerid, 278);
        }
        if(listitem == 2) {
            return SetPlayerSkin(playerid, 279);
        }
    }
    return 1;
}
Reply
#10

No still doesn't work.
I have tried with Switch , If , without zcmd no no no

only thing that works was putting it like this
CMD:SHIT(playerid, params[])
{
SetPlayerSkin(playerid, 279);
}
THA DA
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)