Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cartman

Pages: [1]
1
Suggestions / Re: Suggestions
« on: March 21, 2010, 05:10:33 pm »
My suggestion is "/lockchat" because the server is not MSN, ICQ, IRQ, twitter.... the server is from race!

I use this command in "XtremeAdmin" (Xadmin) but you can change this for your admin FS.

well, Rac3r is a great scripter then I'll be very direct:

Code: [Select]
enum ServerInfoEnum
{
    ChatClosed
};


Code: [Select]
public OnPlayerCommandText(playerid,cmdtext[])
{
        dcmd(lockchat,8,cmdtext);
  dcmd(unlockchat,10,cmdtext);
        return 0;
}

Code: [Select]
//===[/lockchat]===

dcmd_lockchat(playerid,params[])
{
    if(IsPlayerCommandLevel(playerid,"lockchat"))
{
    #pragma unused params
    //SendCommandMessageToAdmins(playerid,"Lockchat");
    new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"O administrador '%s' fechou o chat para o público",name);
SendClientMessageToAll(COLOR HERE,string);
ServerInfo[ChatClosed] = 1;
}
else return SendLevelErrorMessage(playerid,"lockchat");
return 1;
}

//===[/unlockchat]===

dcmd_unlockchat(playerid,params[])
{
    if(IsPlayerCommandLevel(playerid,"unlockchat"))
{
    #pragma unused params
    //SendCommandMessageToAdmins(playerid,"unLockchat");
    new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"O administrador '%s' abriu o chat para o público",name);
SendClientMessageToAll(COLOR HERE,string);
ServerInfo[ChatClosed] = 0;
}
else return SendLevelErrorMessage(playerid,"unlockchat");
return 1;
}

Code: [Select]
public OnPlayerText(playerid,text[])
{
if(ServerInfo[ChatClosed] == 1 && !IsPlayerXAdmin(playerid))
{
SendClientMessage(playerid,COLOR HERE,"O chat está trancado para o público");
return 0;
}
        return 1;
}

My nick in game is Tancredi, but my old nick is [KaE]Cartman, and i from Brazil and you need convert all messages from Portuguese into English

if there is any problem, let me know ok? basically this is the command. I hope you like

Cya dudes!

Pages: [1]