24.03.2018, 14:20
PHP код:
CMD:forumname(playerid,params[])
{
if(pInfo[playerid][pAdminLevel] >= 2)
{
new targetid,FName[24],string[128];
if(sscanf(params, "us[105]", targetid,FName)) return SendClientMessage(playerid,COLOR_LIGHTBLUE, "CMD: /ForumName [PlayerID] [Nume]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Acest player nu este online !");
pInfo[targetid][ForumName] = FName;
SaveStats(targetid);
format(string,sizeof(string),"*"COL_RED" %s %s has set %s's forum name into %s", GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),FName);
SendClientMessageToAll(-1,string);
format(string,sizeof(string),"*"COL_RED" %s %s has set your FName to %s",GetAdminName(playerid), PlayerName(playerid),FName);
SendClientMessage(targetid,-1,string);
}
else {
SendClientMessage(playerid,-1,"*"COL_RED" You no admin!");
}
return 1;
}
PHP код:
enum playerinfo
{
ForumName[24],
`ForumName` varchar(24) NOT NULL,
cache_get_field_content(0, "ForumName", tmp), pInfo[playerid][ForumName] = strval(tmp);