08.03.2016, 15:57
such people ?,
my question is how to add an additional parameter after it has been verified with sscanf the first part, below I give you an example of the doubt.
my question is how to add an additional parameter after it has been verified with sscanf the first part, below I give you an example of the doubt.
Код:
CMD:test(playerid, params[])
{
if(sscanf(params, "i", params[0]))
{
SCM(playerid, COLOR_LABELS, "/test [id test]");
SCM(playerid, -1, "[ID test]: 1: test1 2: test2 3: test3");
return 1;
}
new helloworld;
if(params[0] < 1 || params[1] > 3) return SendClientMessage(playerid, -1, "Error option.");
switch(params[0]) {
case 1: {
new player;
if(sscanf(params, "r", player))
{
SCM(playerid, COLOR_LABELS, "/test [id test] [player]");
return 1;
}
// How to add another parameter more here?, example: /test idtest player. "Player" would be the new parameter
}
case 2: helloworld++;
case 3: helloworld++;
}
}


