random spawn ciwila(ne znam namestiti samo da radi za ciwile ne i za PD)

Započeo Jiky, April 11, 2020, 02:24:58 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

[pawn]new Float:RandomSpawns[][]=
{
   //RANDOM SPAWNS
   {-1949.7802,-2427.8425,30.3521,44.5578},
   {-2041.3539,-2378.3423,30.3551,134.0501},
   {-2116.7395,-2353.2896,30.3484,50.8498},
   {-2118.5515,-2308.7422,30.3521,51.2537},
   {-2112.7954,-2241.0249,30.3521,228.7324},
   {-2096.8430,-2231.2488,30.4514,317.6216},
   {-2065.1985,-2252.1321,31.4916,52.1717},
   {-2083.2808,-2322.0374,30.3521,48.3326},
   {-2090.9819,-2333.9399,30.3521,50.5339},
   {-2140.7061,-2448.6567,30.3579,144.5333},
   {-2177.4202,-2427.8684,30.3521,230.8686},
   {-2199.7710,-2502.2148,30.3443,320.3152},
   {-2113.1650,-2524.6384,30.3521,321.4799},
   {-2090.4971,-2447.5679,30.2714,52.3829}
};[/pawn]

[pawn]public OnPlayerSpawn(playerid)
{
   SetPlayerToTeamColor(playerid);
   {
   if(gTeam[playerid] == TEAM_CIVIL) /// moj pokusaj
   new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    else SetPlayerPos(playerid,-2162.3796,-2386.2373,30.6250);
    }
    return 1;
}[/pawn]

problem je objasnen u topic name..

pokusaj ovako ako ne radi reci

[pawn]
public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColor(playerid);

    if(gTeam[playerid] == TEAM_CIVIL) {
        new Random = random(sizeof(RandomSpawns));
       
        SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    } else SetPlayerPos(playerid,-2162.3796,-2386.2373,30.6250);
    return 1;
}
[/pawn]

Citat: Emmett poslato April 11, 2020, 02:29:10 PRE PODNE
pokusaj ovako ako ne radi reci

[pawn]
public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColor(playerid);

    if(gTeam[playerid] == TEAM_CIVIL) {
        new Random = random(sizeof(RandomSpawns));
       
        SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
    } else SetPlayerPos(playerid,-2162.3796,-2386.2373,30.6250);
    return 1;
}
[/pawn]

pawn compiler library has stopped working.... da ti posaljem gmod da sredis ?