#define Skin 120
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/changeskin", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, Skin, DIALOG_STYLE_INPUT, "Change Skin", "Enter a skin ID below to get started", "Confirm", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Skin)
{
if(response)
{
new skinid, message[64];
skinid = strval(inputtext);
if(skinid < 0 || skinid > 299)
{
SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
}
else
{
SetPlayerSkin(playerid, skinid);
format(message, sizeof(message), "You have successfully changed your skin id to %d.", skinid);
SendClientMessage(playerid, 0x33FF33AA, message);
}
}
}
return 1;
}
Desktop\Untitled.pwn(4) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText") Desktop\Untitled.pwn(6) : error 017: undefined symbol "strcmp" Desktop\Untitled.pwn( : error 017: undefined symbol "ShowPlayerDialog" Desktop\Untitled.pwn(14) : warning 235: public function lacks forward declaration (symbol "OnDialogResponse") Desktop\Untitled.pwn(21) : error 017: undefined symbol "strval" Desktop\Untitled.pwn(24) : error 017: undefined symbol "SendClientMessage" Desktop\Untitled.pwn(2 : error 017: undefined symbol "SetPlayerSkin" Desktop\Untitled.pwn(29) : error 017: undefined symbol "format" Desktop\Untitled.pwn(29) : warning 202: number of arguments does not match definition Desktop\Untitled.pwn(29) : warning 202: number of arguments does not match definition Desktop\Untitled.pwn(29) : warning 202: number of arguments does not match definition Desktop\Untitled.pwn(30) : error 017: undefined symbol "SendClientMessage" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors. |
#include <a_samp>
#define Skin 120
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/changeskin", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, Skin, DIALOG_STYLE_INPUT, "Change Skin", "Enter a skin ID below to get started", "Confirm", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == Skin)
{
if(response)
{
new skinid, message[64];
skinid = strval(inputtext);
if(skinid < 0 || skinid > 299)
{
SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
}
else
{
SetPlayerSkin(playerid, skinid);
format(message, sizeof(message), "You have successfully changed your skin id to %d.", skinid);
SendClientMessage(playerid, 0x33FF33AA, message);
}
}
}
return 1;
}