/aooc? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /aooc? (
/showthread.php?tid=172660)
/aooc? -
Luis- - 30.08.2010
Hey!, I made this code for Rcon admin untill I get my Admin system, It saneds this "Admin Name:" Whic his what I want it to send but I want to send a message also E.g If I type "LOL" I want it to send that.
pawn Код:
if (strcmp("/aooc", cmdtext, true, 10) == 0)
{
IsPlayerAdmin(playerid);
if(!strlen(cmdtext)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /aooc [chat]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Admin %s: %s", str, cmdtext);
SendClientMessageToAll(COLOR_GOLD, str);
return 1;
}
Re: /aooc? -
Yamoo - 31.08.2010
Код:
if (strcmp("/aooc", cmdtext, true, 10) == 0)
{
IsPlayerAdmin(playerid);
if(!strlen(cmdtext)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /aooc [chat]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Admin %s: %s", GetPlayerName(playerid), cmdtext);
SendClientMessageToAll(COLOR_GOLD, str);
return 1;
}
I ain't sure if it's it, i'm to tired to even type but i thought i'd give it a go.
Re: /aooc? -
AndriusZ* - 31.08.2010
if (strcmp("/aooc", cmdtext, true, 5) == 0)
{
IsPlayerAdmin(playerid);
if(!strlen(cmdtext)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /aooc [chat]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Admin %s: %s", str, cmdtext);
SendClientMessageToAll(COLOR_GOLD, str);
return 1;
}
Re: /aooc? -
Luis- - 31.08.2010
Nah sorry none of them work..
Re: /aooc? -
mrcoolballs - 31.08.2010
try creating a new name[MAX_PLAYER_NAME]; then use GetPlayerName(playerid,name,sizeof(name));
and when you format it change the GetPlayerName(playerid) to name