Admin Tags - Mask System. - 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)
+--- Thread: Admin Tags - Mask System. (
/showthread.php?tid=442888)
Admin Tags - Mask System. -
faff - 09.06.2013
Hello, I've been trying to re-script the admin tags.
Without succes.
This is the command..
pawn Код:
CMD:atag(playerid, params[])
{
new string[128];
new text[24];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You have to be OFF admin duty to use this command!");
if(sscanf(params, "s[24]", text)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /atag [admin tag]");
format(string, sizeof(string), "AdmWarn: %s has changed his admin tag to %s. ", RPN(playerid), text);
SendAdminMessage(COLOR_DARKRED, 1, string);
PlayerInfo[playerid][aMask] = text; //line 18583
return 1;
}
And i'm getting this error:
Код:
(18583) : error 006: must be assigned to an array
I hope somebody could help me.
Re: Admin Tags - Mask System. -
Aly - 09.06.2013
Quote:
Originally Posted by faff
Hello, I've been trying to re-script the admin tags.
Without succes.
This is the command..
pawn Код:
CMD:atag(playerid, params[]) { new string[128]; new text[24]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You have to be OFF admin duty to use this command!"); if(sscanf(params, "s[24]", text)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /atag [admin tag]"); format(string, sizeof(string), "AdmWarn: %s has changed his admin tag to %s. ", RPN(playerid), text); SendAdminMessage(COLOR_DARKRED, 1, string); PlayerInfo[playerid][aMask] = text; //line 18583 return 1; }
And i'm getting this error:
Код:
(18583) : error 006: must be assigned to an array
I hope somebody could help me.
|
pawn Код:
format(PlayerInfo[playerid][aMask],128,"%s",text);
pawn Код:
enum pInfo
{
...
aMask[128],
...
};
Re: Admin Tags - Mask System. -
OrMisicL - 09.06.2013
try
pawn Код:
strmid(PlayerInfo[playerid][aMask], text, 1, strlen(text), sizeof(PlayerInfo[playerid][aMask]));
Re: Admin Tags - Mask System. -
faff - 09.06.2013
Quote:
Originally Posted by Aly
pawn Код:
format(PlayerInfo[playerid][aMask],128,"%s",text);
pawn Код:
enum pInfo { ... aMask[128], ... };
|
Thanks!