/smstoall [REQ+] - 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: /smstoall [REQ+] (
/showthread.php?tid=332182)
/smstoall [REQ+] -
paulll0len - 07.04.2012
Hello, Can some1 make me /smstoall..
Please.
Re: /smstoall [REQ+] -
ivanVU - 07.04.2012
Код:
CMD:smstoall(playerid,params[])
{
new string[128],text[128];
if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, -1, "Usage: /smstoall [Text]");
format(string,sizeof(string),"%s says : %s",GetPlayerName(playerid),text);
SendClientMessageToAll(-1,string);
return true;
}
You need zcmd and sscanf
Re: /smstoall [REQ+] -
DamienWalter - 15.05.2012
i got here its pretty Simple
Код:
CMD:smstoall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1;
}
new string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /smstoall [sms text]");
format(string, sizeof(string), "SMS: %s, Sender: SENDER (143)",params);
if (gTeam[playerid] < 3){SendClientMessageEx(playerid, COLOR_YELLOW, string);}
SendEnemyMessage(COLOR_YELLOW, string);
foreach(Player, i)
{
if(gTeam[i] >= 3 && gPlayerSpawned[i])
{
RingTone[i] =20;
}
}
return 1;
}