Not Swtiching
#3

Try this.
Код:
CMD:rescuetest(playerid, params[])
{
    switch (APlayerData[playerid][PlayerClass])
    {
        case TEAM_TRUCKER:
        {
            // Set the spawn coordinates based on the selection in the list
            switch (random(8))
            {
                case 0: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), -525.0, -502.0, 26.0, 0.0, 0, 0, 0, 0, 0, 0);
                case 1: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), -74.7, -1137.5, 4.5, 0.0, 0, 0, 0, 0, 0, 0);
                case 2: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), 1457.0, 975.5, 11.0, 0.0, 0, 0, 0, 0, 0, 0);
                case 3: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), -2136.0, -247.5, 36.5, 270.0, 0, 0, 0, 0, 0, 0);
                case 4: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), 1766.5, -2040.7, 14.0, 270.0, 0, 0, 0, 0, 0, 0);
                case 5: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), -546.0, 2594.0, 54.0, 270.0, 0, 0, 0, 0, 0, 0);
                case 6: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), 332.0, 900.0, 25.0, 205.0, 0, 0, 0, 0, 0, 0);
                case 7: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), -1575.0, -2724.0, 49.0, 146.0, 0, 0, 0, 0, 0, 0);
            }
    }
    case TEAM_BUSDRIVER:
    {
            // Set the spawn coordinates based on the selection in the list
            switch (switchVar)
            {
                case 0: SetSpawnInfo(playerid, 0, GetPlayerSkin(playerid), 2863.9058,-2010.4265,11.1016,93.4327,0,0,0,0,0,0);
            }
        }
    }
    SpawnPlayer(playerid); // Force the player to spawn at the requested coordinates
    SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerRescued); // Send the player a message that using "/rescue" costs $100
    SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerRescued2); // Send the player a message that using "/rescue" costs $100
    // Reduce the player's money by 100
    RewardPlayer(playerid, -100, 0);
    return 1;
}
Reply


Messages In This Thread
Not Swtiching - by DerickClark - 25.01.2014, 23:21
AW: Not Swtiching - by Nero_3D - 25.01.2014, 23:54
Re: Not Swtiching - by Ranshand - 26.01.2014, 00:22
Re: Not Swtiching - by DerickClark - 26.01.2014, 01:11

Forum Jump:


Users browsing this thread: 1 Guest(s)