}
CMD:me(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/me [action]");
new string[128];
format(string, sizeof(string), "* %s %s", GetName(playerid), params);
SendNearbyMessage(playerid, COLOR_ME, string);
return 1;
}
CMD:do(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/do [enviornment]");
new string[128];
format(string, sizeof(string), "%s (( %s ))", params, GetName(playerid));
SendNearbyMessage(playerid, COLOR_ME, string);
return 1;
}
CMD:b(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/b [message]");
if(strlen(params) > 90)
return SendClientMessage(playerid, COLOR_RED1, "ERROR: Your message cannot be longer than 90 characters.");
new string[128];
format(string, sizeof(string), "(( %s(%d): %s ))", GetName(playerid), playerid, params);
SendNearbyMessage(playerid, COLOR_GREY, string);
return 1;
}
stock GetNames(playerid, ...)
{
new names[64], pnames[MAX_PLAYER_NAME], num;
for(new i; i<numargs(); i++)
{
if(IsPlayerConnected(getarg(i)))
{
num++;
GetPlayerName(getarg(i), pnames, MAX_PLAYER_NAME);
format(names, sizeof(names), "Number %d: [ID:%i] Name: %s",num,getarg(i),pnames);
SendClientMessage(playerid,0xDA635CFF,names);
}
else continue;
}
}
CMD:me(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/me [action]");
new string[128], name;
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), "* %s %s", name, params);
SendNearbyMessage(playerid, COLOR_ME, string);
return 1;
}
CMD:do(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/do [enviornment]");
new string[128], name;
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), "%s (( %s ))", params, name);
SendNearbyMessage(playerid, COLOR_ME, string);
return 1;
}
CMD:b(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/b [message]");
if(strlen(params) > 90)
return SendClientMessage(playerid, COLOR_RED1, "ERROR: Your message cannot be longer than 90 characters.");
new string[128], name;
GetPlayerName(playerid,name,sizeof(name))
format(string, sizeof(string), "(( %s(%d): %s ))", name, playerid, params);
SendNearbyMessage(playerid, COLOR_GREY, string);
return 1;
}
Try:
pawn Код:
|
gamemodes\TC-RP1.pwn(677) : error 035: argument type mismatch (argument 2)
gamemodes\TC-RP1.pwn(679) : error 017: undefined symbol "SendNearbyMessage"
gamemodes\TC-RP1.pwn(689) : error 035: argument type mismatch (argument 2)
gamemodes\TC-RP1.pwn(689) : error 035: argument type mismatch (argument 2)
gamemodes\TC-RP1.pwn(691) : error 017: undefined symbol "SendNearbyMessage"
gamemodes\TC-RP1.pwn(702) : error 035: argument type mismatch (argument 2)
gamemodes\TC-RP1.pwn(702) : error 035: argument type mismatch (argument 2)
gamemodes\TC-RP1.pwn(704) : error 017: undefined symbol "SendNearbyMessage"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
9 Errors.
Show your GetName function, You posted a function called GetNames
|
stock GetNames(playerid, ...)
{
new names[64], pnames[MAX_PLAYER_NAME], num;
for(new i; i<numargs(); i++)
{
if(IsPlayerConnected(getarg(i)))
{
num++;
GetPlayerName(getarg(i), pnames, MAX_PLAYER_NAME);
format(names, sizeof(names), "Number %d: [ID:%i] Name: %s",num,getarg(i),pnames);
SendClientMessage(playerid,0xDA635CFF,names);
}
else continue;
}
}
stock GetName( playerid )
{
new
pName[ 24 ]
;
return GetPlayerName( playerid, pName, sizeof pName ), pName;
}
CMD:me(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/me [action]");
new string[128];
format(string, sizeof(string), "* %s %s", GetName(playerid), params);
SendNearbyMessage(playerid, COLOR_ME, string);
return 1;
}
pawn Код:
|
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: error 001: expected token: "-identifier-", but found "("
: error 010: invalid function or declaration
: warning 203: symbol is never used: "pName"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.