random jail spawn - 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: random jail spawn (
/showthread.php?tid=390842)
random jail spawn -
HardBoy - 08.11.2012
hey i made when player enter jail he enters randomly one of the 3 jail rooms
1st and 2nd and 3rd
but its only letting him enter 1 jail room and always the same room (no random -_-)
check for me my mistake, this code in the arrest command
code:
pawn Code:
new rand = random( 3 );
switch(rand)
{
case 0:
{
SetPlayerInterior(ID, 10);
SetPlayerPos(ID,223.6557,111.3819,999.0156);
}
case 1:
{
SetPlayerInterior(ID, 10);
SetPlayerPos(ID,219.7776,111.4767,999.0156);
}
case 3:
{
SetPlayerInterior(ID, 10);
SetPlayerPos(ID,215.5770,111.1958,999.0156);
}
}
Re: random jail spawn -
Vince - 08.11.2012
0, 1,
2.
Re: random jail spawn -
HardBoy - 08.11.2012
Quote:
Originally Posted by Vince
0, 1, 2.
|
thanks, it was a stupid mistake xD