Dynamic cp why it dosnt works.
#1

Код:
    if(checkpointid == bmx[1]) //This checks what checkpoint it is before it continues
    {
        GameTextForPlayer(playerid, "+100xp", 4000, 5); //It will show this if a player steps in the checkpoint
        GivePlayerScore( playerid, 100 );
        DestroyDynamicCP(bmx[1]);
        bmx[2] = CreateDynamicCP(972.4807,-1380.8164,21.1588, 2, 50, -1, -1, 100);
        if(IsPlayerInAnyVehicle(playerid))
        {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                        SetVehiclePos(GetPlayerVehicleID(playerid), 914.6419,-1416.6122,12.7083);
                        SetCameraBehindPlayer(playerid);
                }
                else
                {
                        SendClientMessage(playerid,-1, "ERROR: Jus turite sedeti masinoje");
                }
        }
        else
        {
                SetPlayerPos(playerid, 914.6419,-1416.6122,12.7083);
                SetPlayerFacingAngle(playerid, 110.5445);
                SetCameraBehindPlayer(playerid);
        }
    }
    if(checkpointid == bmx[2]) //This checks what checkpoint it is before it continues
    {
        GameTextForPlayer(playerid, "Iveikete gavote +150xp", 4000, 5); //It will show this if a player steps in the checkpoint
        DestroyDynamicCP(bmx[2]);
        GivePlayerScore( playerid, 150 );
        bmx[3] = CreateDynamicCP(972.4807,-1380.8164,21.1588, 2, 50, -1, -1, 100);
        if(IsPlayerInAnyVehicle(playerid))
        {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                        SetVehiclePos(GetPlayerVehicleID(playerid), 914.6419,-1416.6122,12.7083);
                        SetCameraBehindPlayer(playerid);
                }
                else
                {
                        SendClientMessage(playerid,-1, "ERROR: Jus turite sedeti masinoje");
                }
        }
        else
        {
                SetPlayerPos(playerid, 914.6419,-1416.6122,12.7083);
                SetPlayerFacingAngle(playerid, 110.5445);
                SetCameraBehindPlayer(playerid);
        }
    }
Where is a problem? I pick first cp i teleport to second spot, but when i pick cp i just get thesame 100xp and gametext dosn change..
Reply


Messages In This Thread
Dynamic cp why it dosnt works. - by sn0p - 18.01.2015, 12:22

Forum Jump:


Users browsing this thread: 1 Guest(s)