SA-MP Forums Archive
1 Error very simple help me. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 1 Error very simple help me. (/showthread.php?tid=244641)



1 Error very simple help me. - Davz*|*Criss - 27.03.2011

hey scripters.

I am trying to make an minigun minigame.

Like:- When player types /mg1

it joins him to minigame set hes pos to SetPlayerPos(playerid, -956.6, 1862.23, 9.01);

and when ever player types /mg1

it not sets the player pos SetPlayerPos(playerid, -956.6, 1862.23, 9.01);

it would set like different pos SetPlayerPos(playerid, 9561.6, 1624.23, 5501);

like different positions i want.

thnx


Re: 1 Error very simple help me. - mprofitt - 27.03.2011

find about 20 positions, record them, and hand them out randomly


Re: 1 Error very simple help me. - Davz*|*Criss - 27.03.2011

What are you saying? lol.

I want like whenever player types, /mg1 i want in the player spawn in 5 diff positions.

i given example read that pls.

like i want player not spawn in that interior in spawn place.


Re: 1 Error very simple help me. - grand.Theft.Otto - 27.03.2011

Use this, it will help you like I did, I also have a minigun DM:

https://sampwiki.blast.hk/wiki/Random
But, you will need to make variables to determine whether the player is in MG, my variable for it is :

pawn Код:
new PlayerInMG[MAX_PLAYERS];
So, put PlayerInMG[playerid] == 1; under your mg command, then under OnPlayerDeath, do
pawn Код:
if(PlayerInMG[playerid] == 1;
{
    new rand = random(sizeof(RandomSpawn));
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    return 1;
}