SA-MP Forums Archive
DCMD - 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: DCMD (/showthread.php?tid=279283)



DCMD - Urefeu - 26.08.2011

Hello.

I use DCMD to write my orders and I know how to put multiple commands doing the same thing.

For example, / and admins / staff would display both the list of Staff connected, but it would be silly to double the order.

No problem to do that with strtok, but there I stuck ..

thank you


Re: DCMD - Bakr - 26.08.2011

Are you trying to get two commands to do the same thing?
pawn Код:
dcmd_admins( playerid, params[ ] ) return dcmd_staff( playerid, params );
Then have dcmd_staff contain the actual code.


Re : DCMD - Urefeu - 31.08.2011

Код:
dcmd_staff(playerid, params[]) {
    new AW; sscanf(params, "''", AW); // ANTI WARNING
	SendClientMessage(playerid, INFO, "Staff Connected : ");
	for(new i = 0; i < MAX_PLAYERS; i++) {
	    if(pData[i][modeStaff] = 1) {
			format(string[0], 50, "[%s] %s (%d)", pData[i][rang], pData[i][pseudo], i);
			SendClientMessage(playerid, INFO, string[0]);
		}
	}
	return 1;
}

dcmd_admins(playerid, params[]) return dcmd_staff(playerid, params[]);
Return : error 029: invalid expression, assumed zero
For this line :
Код:
dcmd_admins(playerid, params[]) return dcmd_staff(playerid, params[]);
:/


Re: Re : DCMD - FireCat - 31.08.2011

Quote:
Originally Posted by Urefeu
Посмотреть сообщение
Код:
dcmd_staff(playerid, params[]) {
    new AW; sscanf(params, "''", AW); // ANTI WARNING
	SendClientMessage(playerid, INFO, "Staff Connected : ");
	for(new i = 0; i < MAX_PLAYERS; i++) {
	    if(pData[i][modeStaff] = 1) {
			format(string[0], 50, "[%s] %s (%d)", pData[i][rang], pData[i][pseudo], i);
			SendClientMessage(playerid, INFO, string[0]);
		}
	}
	return 1;
}

dcmd_admins(playerid, params[]) return dcmd_staff(playerid, params[]);
Return : error 029: invalid expression, assumed zero
For this line :
Код:
dcmd_admins(playerid, params[]) return dcmd_staff(playerid, params[]);
:/
pawn Код:
dcmd_admins(playerid, params[]) return dcmd_staff(playerid, params);



Re : DCMD - Urefeu - 31.08.2011

Thanks


Re: Re : DCMD - FireCat - 31.08.2011

Quote:
Originally Posted by Urefeu
Посмотреть сообщение
Thanks
Np
Rep?