color help
#1

what is wrong
pawn Код:
#include <a_samp>
#define Colours 4321


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" color by your nicoud");
    print("--------------------------------------\n");
    return 1;
}

forward Color();

public OnGameModeInit()
{
    SetTimerEx("Color",1000,false);
    return 1;
}

public Color()
{
    ShowPlayerDialog(playerid, Colours, DIALOG_STYLE_LIST, "Choose your Color", "Red\nGreen\nBlue\nBlack\nAqua\nPink", "Pick", "Cancel");
    return 1;
}



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Colours)
    {
        switch(listitem)
        {
            case 0: SetPlayerColor(playerid, 0xFF0000FF);
            case 1: SetPlayerColor(playerid, 0x00FF00FF);
            case 2: SetPlayerColor(playerid, 0x0000FFFF);
            case 3: SetPlayerColor(playerid, 0xFFFFFFFF);
            case 4: SetPlayerColor(playerid, 0x00FFFFFF);
            case 5: SetPlayerColor(playerid, 0xFF00FFFF);
        }
    }
    return 1;
}
error report
Код:
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\filterscripts\color.pwn(17) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\filterscripts\color.pwn(23) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#2

Код:
#include <a_samp>
#define Colours 4321


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" color by your nicoud");
    print("--------------------------------------\n");
    return 1;
}

forward Color();

public OnGameModeInit()
{
    SetTimer("Color",1000,false);
    return 1;
}

public Color()
{
    new playerid;
    ShowPlayerDialog(playerid, Colours, DIALOG_STYLE_LIST, "Choose your Color", "Red\nGreen\nBlue\nBlack\nAqua\nPink", "Pick", "Cancel");
    return 1;
}



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Colours)
    {
        switch(listitem)
        {
            case 0: SetPlayerColor(playerid, 0xFF0000FF);
            case 1: SetPlayerColor(playerid, 0x00FF00FF);
            case 2: SetPlayerColor(playerid, 0x0000FFFF);
            case 3: SetPlayerColor(playerid, 0xFFFFFFFF);
            case 4: SetPlayerColor(playerid, 0x00FFFFFF);
            case 5: SetPlayerColor(playerid, 0xFF00FFFF);
        }
    }
    return 1;
}
Reply
#3

I suggest to put in under onplayerconnect:

pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("Color", 1000, false, "i", playerid);
    return 1;
}

public Color(playerid)
{
    ShowPlayerDialog(.....);
    return 1;
}
Reply
#4

nope doesnt work niether
Reply
#5

Код:
include <a_samp>
#define Colours 4321


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" color by your nicoud");
    print("--------------------------------------\n");
    return 1;
}

forward Color(playerid);

public OnGameModeInit()
{
    SetTimer("Color",1000,false);
    return 1;
}

public Color(playerid)
{
    ShowPlayerDialog(playerid, Colours, DIALOG_STYLE_LIST, "Choose your Color", "Red\nGreen\nBlue\nBlack\nAqua\nPink", "Pick", "Cancel");
    return 1;
}



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Colours)
    {
        switch(listitem)
        {
            case 0: SetPlayerColor(playerid, 0xFF0000FF);
            case 1: SetPlayerColor(playerid, 0x00FF00FF);
            case 2: SetPlayerColor(playerid, 0x0000FFFF);
            case 3: SetPlayerColor(playerid, 0xFFFFFFFF);
            case 4: SetPlayerColor(playerid, 0x00FFFFFF);
            case 5: SetPlayerColor(playerid, 0xFF00FFFF);
        }
    }
    return 1;
}
Reply
#6

Surely its

Case 0:
{
SetPlayerColor(playerid,0xFF00FFFF);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)