New Random spawns inside a fowarded public?
#1

pawn Код:
forward RandSpawns(playerid);
public RandSpawns(playerid)
{
//RC BATTLEFIELD
    if(gPlayerClass[playerid] == TEAM_RED)
    {
        new Float:RedTeamRCRandomSpawns[10][4] =
        {
            {-973.5748, 1080.5066, 1344.9911, 85.2609},
            {-974.1147, 1078.9847, 1344.9885, 85.2609},
            {-974.6940, 1077.2397, 1344.9858, 85.2609},
            {-974.9780, 1075.3998, 1344.9895, 91.8410},
            {-975.4444, 1073.9126, 1344.9888, 89.0210},
            {-975.0948, 1071.5247, 1344.9895, 89.0210},
            {-975.5975, 1069.6199, 1344.9885, 89.0210},
            {-976.0765, 1068.1102, 1344.9874, 89.0210},
            {-976.1094, 1066.2621, 1344.9900, 89.0210},
            {-976.0048, 1064.1754, 1344.9895, 89.0210}
            };
        }
    else if(gPlayerClass[playerid] == TEAM_BLUE)
    {
        new Float:BlueTeamRCRandomSpawns[10][4] =
        {
            {-1133.6245, 1037.4701, 1345.7446, 278.2761},
            {-1133.4700, 1039.8145, 1345.7478, 273.2628},
            {-1133.1245, 1042.0516, 1345.7478, 273.2628},
            {-1132.7894, 1044.1230, 1345.7476, 273.2628},
            {-1132.4633, 1046.6809, 1345.7554, 273.2628},
            {-1132.1117, 1048.5112, 1345.7500, 273.2628},
            {-1131.7700, 1050.1018, 1345.7478, 273.2628},
            {-1131.4286, 1051.3604, 1345.7462, 273.2628},
            {1131.0404, 1052.5400, 1345.7432, 273.2628},
            {1130.7424, 1054.3011, 1345.7496, 273.2628}
            };
        }
        return 1;
    }
Indentation is not in my favor right now, sorry for that :/
Question is; Do you guys think it could be easier to code than this?
Reply
#2

Yes but I was having a few troubles ingame without the declaration, I was spawning still at the red team if I was a blue team member and vice versa
Reply
#3

Yes, I know but I have checked my if statements, its all set for either Blue OR Red, I am still a early beginner and I confuse myself coding still, I have a long way to go before I am actually good but I am still trying...
I can't figure out where else the problem could be for the spawn problem due to everything else being none the less.. perfect XD
I spawn correctly
The spawn points are working
The spawns are random

The only problem is that they are not for one team defined
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)