#include <a_samp> new player_tag[24] // Max tag letters (24) CMD:settag(playerid,params[]) // zCMD. { if(IsPlayerAdmin(playerid)) { new target,string[60]; if(sscanf(params,"us",target,player_tag)) return SendClientMessage(playerid,-1,"* /settag [playerid/partofname] [tag]"); SendClientMessage(playerid,"Tag set."); } } public OnPlayerText(playerid, text[]) { new name[MAX_PLAYER_NAME],string[180]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"<%s> %s: %s",player_tag,name,text); SendClientMessageToAll(-1,string); return 0; }
CMD:settag(playerid,params[]) // zCMD.
Код:
#include <a_samp> new player_tag[24] // Max tag letters (24) CMD:settag(playerid,params[]) // zCMD. { if(IsPlayerAdmin(playerid)) { new target,string[60]; if(sscanf(params,"us",target,player_tag)) return SendClientMessage(playerid,-1,"* /settag [playerid/partofname] [tag]"); SendClientMessage(playerid,"Tag set."); } } public OnPlayerText(playerid, text[]) { new name[MAX_PLAYER_NAME],string[180]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"<%s> %s: %s",player_tag,name,text); SendClientMessageToAll(-1,string); return 0; } Error line: Код:
CMD:settag(playerid,params[]) // zCMD. |
#include <a_samp>
new player_tag[24]; // Max tag letters (24)
CMD:settag(playerid,params[]) // zCMD.
{
if(IsPlayerAdmin(playerid))
{
new target,string[60];
if(sscanf(params,"us",target,player_tag)) return SendClientMessage(playerid,-1,"* /settag [playerid/partofname] [tag]");
SendClientMessage(playerid,"Tag set.");
}
}
public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME],string[180];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"<%s> %s: %s",player_tag,name,text);
SendClientMessageToAll(-1,string);
return 0;
}
Error: error 001: expected token: ";", but found "-label-" Error line: CMD:settag(playerid,params[]) // zCMD.