SA-MP Forums Archive
How To Use Cases... - 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: How To Use Cases... (/showthread.php?tid=556531)



How To Use Cases... - danish007 - 10.01.2015

hello my question is that can we use cases like stocks?

like we create case
pawn Код:
stock testing(playerid)
{
//codeeeeeee
}
and we use it like this..
pawn Код:
testing(playerid);
so can we use cases like this?
or any good and easy way? to repeat case


Re: How To Use Cases... - CalvinC - 10.01.2015

I don't really understand your question.
Cases are used in switches.
https://sampwiki.blast.hk/wiki/Control_Structures#case
Switches and cases can be used inside stocks aswell.


Re: How To Use Cases... - Dignity - 10.01.2015

You can (re)use a function like that, yes. As the poster above me mentioned, cases are something else.


Re: How To Use Cases... - danish007 - 11.01.2015

alirght.. thanks i use stocks.