#1

Need an example for a command announcing all players on the server about it. (/announce "Message" Then it sends to all. Waiting for your help guys.) By strcmp/Scanf/ZCMD.
Reply
#2

And please. I want a tutorial to step the first step at Scanf/ZCMD commands with it. I should be clear not complicated. And thanks.
Reply
#3

With this command you can define the time and the type of gametext :

Код:
CMD:announce(playerid, params[]) {
new Announce[129], Time, Style;
if(sscanf(params, "s[129]dd", Announce, Time, Style)) return SendClientMessage(playerid, COLOR, "/Announce <Text> <Time> <Style>");
else
{
if(Style > 6 || Style < 0) return  SendClientMessage(playerid, COLOR, "Style | 0 - 6");
if (Time > 20*1000) return SendClientMessage(playerid, COLOR, "[ERROR]: Cannot send ads longer than 20 seconds.");
if(Style == 2) return SendClientMessage(playerid, COLOR, "[ERROR]: Unable to use the style 2, this style is bugged.");
GameTextForAll(Announce, Time, Style );
}
return 1;
}
Instead if you want a simple command, for example /announce text :

Код:
CMD:announce(playerid, params[]) {
new Announce[129];
if(sscanf(params, "s[129]", Announce)) return SendClientMessage(playerid, COLOR, "/Announce <Text>");
else
{
GameTextForAll(Announce, 8000, 3 );
}
return 1;
}
Tutorial ZCMD + Sscanf : https://sampforum.blast.hk/showthread.php?tid=244841,
https://sampforum.blast.hk/showthread.php?tid=300397
Reply
#4

Quote:
Originally Posted by bodey3333
Посмотреть сообщение
And please. I want a tutorial to step the first step at Scanf/ZCMD commands with it. I should be clear not complicated. And thanks.
Why double post, when there is an edit button ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)