[Help] One code for two commands - 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: [Help] One code for two commands (
/showthread.php?tid=552378)
[Help] One code for two commands -
Arxalan - 24.12.2014
Hello , i want to ask that can i set 1 code for 2 commands (in the same line ) . e.g
PHP Code:
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.
Re: [Help] One code for two commands -
JeaSon - 24.12.2014
pawn Code:
CMD:hide(playerid, params[])
{
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
return 1;
}
CMD:invisible(playerid, params[]) return cmd_hide(playerid, params);
Re: [Help] One code for two commands -
Arxalan - 24.12.2014
Thanks +Rep