[REQUEST] command /o -
kurniarocki - 19.02.2014
anyone have it command, /o for global chanel like (/o my name is kurniarocki) and result is ((
Kurnia_Rocki: my name is kurniarocki))
color of nickname is green
pleaseeee
Re: [REQUEST] command /o -
Vanter - 19.02.2014
using dcmd
pawn Код:
dcmd_o(playerid, params[])
{
new string[128], pname[MAX_PLAYER_NAME];
if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "(usage) /o (Message)");
GetPlayerName(playerid,pname,sizeof(pname));
format(String, sizeof(String), "[GLOBAL] %s(%d) says: %s", pname, playerid, params);
SendClientMessageToAll(0x33AA33AA, string);
return 1;
}
Didn't test it, but it should be working
Re: [REQUEST] command /o -
kurniarocki - 19.02.2014
thanks
Re: [REQUEST] command /o -
kurniarocki - 19.02.2014
can you edit this
pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0) // By Kurnia Rocki
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "ERROR: OOC channel has been disabled by an Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "ERROR: You cannot speak, you have been silenced");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [OOC chat]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] == 0)
{
format(string, sizeof(string), "(( %s ))", (result));
}
else
{
format(string, sizeof(string), "(( %s ))", (result));
}
SendPlayerMessageToAll(playerid, string);
new year,month,day;
getdate(year, month, day);
new hour, minute, second;
gettime(hour,minute,second);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (OOC): (%s)",day,month,year,hour,minute,second, sendername, result);
PublicLog(string);
}
return 1;
}
but only change result, pleasee
Re: [REQUEST] command /o -
kurniarocki - 19.02.2014
please edit mycode
Re: [REQUEST] command /o -
kurniarocki - 23.02.2014
please edit my code, pleaseeeee. rep ++
Re: [REQUEST] command /o -
HitterHitman - 23.02.2014
pawn Код:
dcmd_o(playerid, params[])
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "ERROR: OOC channel has been disabled by an Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "ERROR: You cannot speak, you have been silenced");
return 1;
}
new string[128], pname[MAX_PLAYER_NAME];
if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "(usage) /o (Message)");
GetPlayerName(playerid,pname,sizeof(pname));
format(String, sizeof(String), "[GLOBAL] %s(%d) says: %s", pname, playerid, params);
SendClientMessageToAll(0x33AA33AA, string);
return 1;
}
You wanted this? or..
pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0) // By Kurnia Rocki
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "ERROR: OOC channel has been disabled by an Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "ERROR: You cannot speak, you have been silenced");
return 1;
}
}
new string[128], pname[MAX_PLAYER_NAME];
if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "(usage) /o (Message)");
GetPlayerName(playerid,pname,sizeof(pname));
format(String, sizeof(String), "[GLOBAL] %s(%d) says: %s", pname, playerid, params);
SendClientMessageToAll(0x33AA33AA, string);
return 1;
}
These are untested you can test them. or maybe i didnt understand what you wanted to say :P
Re: [REQUEST] command /o -
kurniarocki - 23.02.2014
thanks