SA-MP Forums Archive
Problem with rCmd by RyDeR - 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: Problem with rCmd by RyDeR (/showthread.php?tid=361809)



Problem with rCmd by RyDeR - Swimor - 22.07.2012

Problem with rCmd by RyDeR,

Hello,
I downloaded RyDeR's rCmd include from here,
I have this code:
Код:
rCmd[s]->servermsg(playerid, success, ServerMessage[]) {
	if(!IsPlayerXAdmin(playerid, xCmdLevel("servermsg"))) return 0;
    if (!success) {
        if(strcmp(Config("Server", "ConnectMsg"),"None",true)) { SendFormatMessage(playerid, 0x008CEAFF, str, "Server Message: {FFFFFF}%s.", Config("Server", "ConnectMsg")); } else SendClientMessage(playerid,0x008CEAFF,"Server Message: None.");
		return SendClientMessage(playerid, 0xFF0000AA, "{FFFFFF}Usage: {FF0000}/ServerMsg [New Message]{FFFFFF} - שינוי ההודעה | {FF0000}/ServerMsg None{FFFFFF} - למחוק את ההודעה");
	}
	format(str, sizeof(sttring), " %s: %s", GetName(playerid), ServerMessage);
	ConfigSet("Server", "ConnectMsg", str);
	SendFormatMessage(playerid, 0x008CEAFF, str, "Server Message: {FFFFFF}%s.", Config("Server", "ConnectMsg")); return 1;
}
rCmd[]->stopall(playerid) {
	#pragma unused playerid
	if(!IsPlayerXAdmin(playerid, xCmdLevel("StopAll"))) return 0;
    for(new i,m=GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i) && (Radio[i] || Music[i])) StopAudioStreamForPlayer(i),Radio[i] = false,Music[i] = false;
    return 1;
}
The first command(/servermsg) is working but the second command(/stopall) not working.
I have 25 commands and only /servermsg is working.

What to do?


Re: Problem with rCmd by RyDeR - Glint - 22.07.2012

Why using rCmd RyDeR told me it is not that stable.


Re: Problem with rCmd by RyDeR - Swimor - 22.07.2012

Because it's the most comfortable I've found so far, you have something else to offer me?


Re: Problem with rCmd by RyDeR - RedJohn - 22.07.2012

Yes, ZCMD, YCMD!


Re: Problem with rCmd by RyDeR - [MM]RoXoR[FS] - 22.07.2012

Use sscanf + ZCMD


Re: Problem with rCmd by RyDeR - Swimor - 22.07.2012

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
Yes, ZCMD, YCMD!
Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
Use sscanf + ZCMD
YCMD or DCMD?


Re: Problem with rCmd by RyDeR - RedJohn - 22.07.2012

YCMD for sure!


Re: Problem with rCmd by RyDeR - Swimor - 22.07.2012

You can give me download only y_commands without all ySI?


Re: Problem with rCmd by RyDeR - RedJohn - 22.07.2012

LINK

Copy to pawno/includes and then go to your script and add
pawn Код:
#include <y_commands>



Re: Problem with rCmd by RyDeR - Swimor - 22.07.2012

C:\Program Files (x86)\pawno\include\y_commands.inc(16 : fatal error 100: cannot read from file: "internal\y_version"