Dynamic CP problem
#1

I'm very very very upset
the Icognito's streamer plugin's CP streamer, s*** A**
it really does...
take a look at my code:
pawn Код:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    /*new string[1000];
    new
        Float:Mdx,
        Float:Mdy,
        Float:Mdz;*/


    new vehicle;
    vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
   
    new NewVehicleID = GetPlayerVehicleID(playerid);
    if(IsPlayerInDynamicCP(playerid, Mcheck[0]))
    {
        // if(OldVehicleID[playerid] != NewVehicleID) return SendClientMessage(playerid,COLOR_RED,"This vehicle does not contain a passenger!");
        // stop previous CP
        DestroyDynamicCP(Mcheck[0]);
        Mcheck[1] = CreateDynamicCP(mInfo[playerid][Del_x], mInfo[playerid][Del_y], mInfo[playerid][Del_z], 2.0, -1, -1, playerid, 400000.0);
    }
    if(IsPlayerInDynamicCP(playerid, Mcheck[1]))
    {
        SendClientMessage(playerid,COLOR_RED,"completed 1/2 of the mission");
        DestroyDynamicCP(Mcheck[1]);
        Mcheck[2] = CreateDynamicCP(mInfo[playerid][Del_x], mInfo[playerid][Del_y], mInfo[playerid][Del_z], 2.0, -1, -1, playerid, 400000.0);
    }
   
    if(IsPlayerInDynamicCP(playerid, STW))
    {
        if(IsWorking[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You already have a job, use /kill to finish it");
        if(vehicle != 516) return SendClientMessage(playerid, COLOR_RED, "You are not in the right vehicle for a mission!");
        // Start the mission
        if(StartMissionBox[playerid] == false)
        {
            ShowPlayerDialog(playerid, 3270, DIALOG_STYLE_MSGBOX, "Driving Mission", "You are about to start a drivers mission\nClick on 'start' to proceed\n\nSee /help for furture help...", "Start", "Cancle");
            TogglePlayerControllable(playerid, 0);
        }
    }
some more code:
pawn Код:
if(vehicle == 516 || vehicle == 421 || vehicle == 409)
        {
            if(gTeam[playerid] == TEAM_DRIVERS)
            {
                if(pInfo[playerid][pJob] == None)
                {
                    if(cinfo[playerid] == 1)
                    {
                            SendClientMessage(playerid, COLOR_LIGHTRED, "|~ U have entered a mission vehicle ~|");
                            SendClientMessage(playerid, COLOR_LIGHTRED, "|~ To start a Job, drive to the checkpoint, located in front of this tennis club. (at your teambase) ~|");
                            SendClientMessage(playerid, COLOR_LIGHTRED, "|~ Then u will get furture instructions. ~|");
                            SendClientMessage(playerid, COLOR_LIGHTRED, "|~ If u want to get a extra little bonus when u finish a job, ~|");
                            SendClientMessage(playerid, COLOR_LIGHTRED, "|~ then get as least Vehicle damage as possible. ~|");
                            SendClientMessage(playerid, COLOR_LIGHTRED, "|~ Type /cinfo if u don't want to display this no more when entering a Vehicle ~|");

                            STW = CreateDynamicCP(669.7355,-1275.9504,13.4609, 2, -1, -1, -1, 50.0);
//                          TogglePlayerDynamicCP(playerid, STW, true);
                            return 1;
                    }
                }
            }
        }
    }
last code is located under OnPlayerStateChange

ok so now the problem...
well basically when I join the team I keep on getting the dialog u shud get when enterring CP STW
wich means that the server thinks im in the STW Checkpoint all the time...
wichh I'm not!!!

please, anyone help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)