#1

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
Reply
#2

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.
Reply
#3

Код:
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[]);
:/
Reply
#4

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);
Reply
#5

Thanks
Reply
#6

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


Forum Jump:


Users browsing this thread: 2 Guest(s)