color help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: color help (
/showthread.php?tid=183058)
color help -
nicoud - 13.10.2010
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
Re: color help -
Hash [NL-RP] - 13.10.2010
Код:
#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;
}
Re: color help - [L3th4l] - 13.10.2010
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;
}
Re: color help -
nicoud - 13.10.2010
nope doesnt work niether
Re: color help -
RenisiL - 14.10.2010
Код:
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;
}
Re: color help -
[UG]Scripter - 14.10.2010
Surely its
Case 0:
{
SetPlayerColor(playerid,0xFF00FFFF);
}