GTAvision.com - Forum - Grand Theft Auto News, Downloads, Community and more...

Position: Grand Theft Auto: San Andreas » Multiplayer » Scripte und kleine Codes » Ich hab ein Problem mit dem Zufall spawn » Druckansicht
Schwip_Schwap, 20.10.2009, 18:48
Hi Forum ich hab ein Problem und zwahr hab ich mir das zufall spawn script von lvdm raus genommen
und bei mir eingefügt nun Trozdem Funkt es nicht Weis vll einer warum also es sieht so aus


Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
new Float:gRandomPlayerSpawns[24][3] = {

   {1958.3783,1343.1572,15.3746},

   {2199.6531,1393.3678,10.8203},

   {2483.5977,1222.0825,10.8203},

   {2637.2712,1129.2743,11.1797},

   {2000.0106,1521.1111,17.0625},

   {2024.8190,1917.9425,12.3386},

   {2261.9048,2035.9547,10.8203},

   {2262.0986,2398.6572,10.8203},

   {2244.2566,2523.7280,10.8203},

   {2335.3228,2786.4478,10.8203},

   {2150.0186,2734.2297,11.1763},

   {2158.0811,2797.5488,10.8203},

   {1969.8301,2722.8564,10.8203},

   {1652.0555,2709.4072,10.8265},

   {1564.0052,2756.9463,10.8203},

   {1271.5452,2554.0227,10.8203},

   {1441.5894,2567.9099,10.8203},

   {1480.6473,2213.5718,11.0234},

   {1400.5906,2225.6960,11.0234},

   {1598.8419,2221.5676,11.0625},

   {1318.7759,1251.3580,10.8203},

   {1558.0731,1007.8292,10.8125},

   {1705.2347,1025.6808,10.8203},

   {968.8336,1805.8030,8.6484},

};


Und trozdem will es Nicht gehen

thx im vorraus
Macronix, 20.10.2009, 19:59
Wie sieht den das Script aus wo du die RandomSpawns benutzt? Achja unten bei dem letzen RandomSpawn
ist ein Komma hinter der } Klammer, das muss weg^^
Robdeflop1, 20.10.2009, 20:18
Hi

Und kann es vielleicht sein dass das fehlt:?

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public OnPlayerSpawn(playerid)
{
   GivePlayerMoney(playerid, PocketMoney);
   SetPlayerInterior(playerid,0);
   SetPlayerRandomSpawn(playerid);
   TogglePlayerClock(playerid,1);
   return 1;
}

public SetPlayerRandomSpawn(playerid)
{
   if (iSpawnSet[playerid] == 1)
   {
      new rand = random(sizeof(gCopPlayerSpawns));
      SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[
rand][2]); // Warp the player
      SetPlayerFacingAngle(playerid, 270.0);
    }
    else if (iSpawnSet[playerid] == 0)
    {
      new rand = random(sizeof(gRandomPlayerSpawns));
      SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlay
erSpawns[rand][2]); // Warp the player
   }
   return 1;
}


Also ich habs in einem script so:

Code:
1
2
3
4
5
6
new Float:RandomSpawn[][4] =
{
   // Position (X, Y, Z, da wo das gesischt hinschaut
   {-3144.5801,1741.7068,10.7973,87.1355},
   {-3373.8662,1720.5365,10.7912,268.7223}
};


Un dann halt da wo das vorkommen soll das der random spawnt dann das:

Code:
1
2
3
4
new iRandom = random(sizeof(RandomSpawn));
     //Setzt die Position dahin wie du´s vorher angegeben hast^^
    SetPlayerPos(playerid, RandomSpawn[iRandom][0], RandomSpawn[iRandom][1],RandomSpawn[iRandom][2]);
    SetPlayerFacingAngle(playerid, RandomSpawn[iRandom][3]);


Probiers aus^^ so hab ichs gemacht

MFG, RoB
GTAvision.com :: Forumregeln :: FAQ :: Impressum :: Kontakt :: RDRvision.com :: LANOIREvision.com :: MaxPayneVision.com
NetVisionWork.NET
.: © 2006-2014 by GTAvision.com :.

Rockstar GamesTake-Two Interactive Deutschland

Free Grand Theft Auto Downloads