PDA

View Full Version : [Help] One code for two commands


Arxalan
24/12/2014, 05:17 AM
Hello , i want to ask that can i set 1 code for 2 commands (in the same line ) . e.g
if(!strcmp(cmdtext, "/hide"))
{
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
return 1;
}


Now if i want to set the same function of /hide to /invisible can i?

In the same line not in another one (in (cmdtext, "/hide"))

If yes then tell me how in CMD: not in that one.

JeaSon
24/12/2014, 05:26 AM
CMD:hide(playerid, params[])
{
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
return 1;
}
CMD:invisible(playerid, params[]) return cmd_hide(playerid, params);

Arxalan
24/12/2014, 05:29 AM
Thanks +Rep