This cp wont show
#1

Hello,i maked some truck delivery.Everything is working,except a thing,the checkpoint for loading won't show.

I use incognito streamer.

When a player types /mission,a checkpoint should appear in the map,but seems not working:

This is the command:

pawn Код:
CMD:mission(playerid, params[])
{
    if(GetPVarInt(playerid,"MissionTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 1 minute before starting a new truck delivery.");

    if(IsATruck(GetPlayerVehicleID(playerid)))
    {
    LoadTruck(playerid);
    }
    else return SendClientMessage(playerid, COLOR_BLUE, "You're not in a truck/van,so you can't start trucker mission.");
   
    if(truckloaded == 1)
    {
    SendClientMessage(playerid, COLOR_BLUE, "You are already making a truck delivery mission.");
    }
    return 1;
}
As you can see,LoadTruck refers to this:

pawn Код:
public LoadTruck(playerid)
{
    new rand = random(sizeof(Destinations));
    CPs[3] = CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2], 3.0);
    SendClientMessage(playerid, COLOR_BLUE, "Your truck/van has been loaded,go to the checkpoint to leave the load and collect the payment.");
    truckloaded = 1;
    SetPVarInt(playerid,"MissionTime",GetTickCount()+60000);
    return 1;
}
What's wrong?
Reply
#2

Why are you always writing the global array SPs[3]?
Why are you making the checkpoint for every player?

This forum requires that you wait 120 seconds between posts. Please try again in 49 seconds.
Reply
#3

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
Why are you always writing the global array SPs[3]?
Why are you making the checkpoint for every player?

This forum requires that you wait 120 seconds between posts. Please try again in 49 seconds.
Because i've OnPlayerEnterDynamicCP with other checkpoints,but this need to be created at the moment...

and CPs[3] is the currently number of the checkpoint.
Reply
#4

The MAX checkpoints without a streamer is 1, The MAX checkpoints with Incognitos is x.

x can be any value as I dont know its limits, however have you reached this?
Reply
#5

As i said,i've Incognito Streamer,so i can have unlimited checkpoints (i think),i've only the problem with the check point n° 3 (the one i posted code above),that needs to create when a player types /mission.
Reply
#6

pawn Код:
CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2], 3.0, -1,-1,-1,-1,100.0);
Reply
#7

Quote:
Originally Posted by Kitten
Посмотреть сообщение
pawn Код:
CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2], 3.0, -1,-1,-1,-1,100.0);
I thought those paramaters were optional?
Reply
#8

Quote:
Originally Posted by Kitten
Посмотреть сообщение
pawn Код:
CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2], 3.0, -1,-1,-1,-1,100.0);
(196 : warning 202: number of arguments does not match definition

As IceCube said,aren't this parameters optionals?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)