18.08.2012, 13:57
I need some help to create a newbie chat for my server.
#include <zcmd>
#include <sscanf>
new *name of the var/string*;
COMMAND:yourcommand(playerid, params[])
{
new tmpstring[164], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(sscanf(params, "s[128]", tmpstring))
{
SendClientMessage(ANGRY_COLOR, ERROR_RED, "ERROR: Usage /n [message]");
return 1;
}
else
{
format(tmpstring, sizeof(tmpstring), "(NEWBIE) %s: %s ", name, tmpstring);
SendClientMessageToAll(GetPlayerColor(playerid), tmpstring);
}
return 1;
}
pawn Код:
{ new tmpstring[164], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); if(sscanf(params, "s[128]", tmpstring)) { SendClientMessage(ANGRY_COLOR, ERROR_RED, "ERROR: Usage /n [message]"); return 1; } else { format(tmpstring, sizeof(tmpstring), "(NEWBIE) %s: %s ", name, tmpstring); SendClientMessageToAll(GetPlayerColor(playerid), tmpstring); } return 1; }[/PAWN] Credits to FalconX |
dcmd_ask(playerid,params[])
{
new str[80];
if(sscanf(params,"s[80]",str)) SendClientMessage(playerid,-1,"Usage : /ask [HELP]");
new name[MAX_PLAYER_NAME],msg[110];
GetPlayerName(playerid,name,20);
format(msg,sizeof(msg),"[HELP]%s(%d) : %s",name,playerid,str);
for(new i=0;i<MAX_PLAYERS;++i)
{
if(IsPlayerConnected(i) && (pInfo[i][Admin] >0 || IsPlayerAdmin(i))
SendClientMessage(i,-1,msg);
}
SendClientMessage(playerid,-1, "Your Question has been sent, Please be calm till you recieve a response.");
return 1;
}
fatal error 100: cannot read from file: "zcmd"
This is what I get when I try to build
Код:
fatal error 100: cannot read from file: "zcmd" |
C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1813) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1838) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1875) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1930) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1955) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1990) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2005) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2030) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2050) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2282) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2346) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\utils.inc(52) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(1975) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(2006) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(2072) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(2226) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(3930) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(4608) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(5953) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(6711) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(7478) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(8799) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(8909) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(8981) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(24113) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(33985) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(34754) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39483) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39483) : error 017: undefined symbol "cmd" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39485) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39486) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39487) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39487) : error 017: undefined symbol "params" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39489) : error 017: undefined symbol "ANGRY_COLOR" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39502) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39532) : warning 203: symbol is never used: "name" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
Ok, after I downloaded zcmd and placed it in the include folder, I get this
Код:
C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1813) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1838) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1875) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1930) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1955) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(1990) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2005) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2030) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2050) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2282) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\JunkBuster.inc(2346) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\pawno\include\utils.inc(52) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(1975) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(2006) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(2072) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(2226) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(3930) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(4608) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(5953) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(6711) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(7478) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(8799) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(8909) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(8981) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(24113) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(33985) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(34754) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39483) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39483) : error 017: undefined symbol "cmd" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39485) : warning 219: local variable "name" shadows a variable at a preceding level C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39486) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39487) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39487) : error 017: undefined symbol "params" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39489) : error 017: undefined symbol "ANGRY_COLOR" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39502) : warning 217: loose indentation C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0115n2.pwn(39532) : warning 203: symbol is never used: "name" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. |
#include <a_samp> #include <a_npc> #include <core> #include <ChatColor> #include <Dini> #include <float> #include <file> #include <JunkBuster> #include <morphinc> #include <time> #include <utils> #include <zcmd> #include <sscanf>