Please help..
#1

Okay, I am making a License code and I need to know whether this is correct as the Checkpoint is not showing?

pawn Код:
if(dialogid == 2)
    {
        if(response)
        {
            new message[256+1];
            new DMV;
            if(listitem == 0)
            {
                format(message, 256, "You have chosen 'Drivers License' please drive carefully", listitem);
                SendClientMessage(playerid, 0xFFFFFFFF, message);
                DMV = AddStaticVehicle(405,-220.8077,1212.4143,19.6102,179.2256,24,1); //
                {
                    if (IsPlayerInVehicle(playerid, DMV))
                    {
                        SetPlayerCheckpoint(playerid, -206.8228,1195.4480,19.4574, 3.0);
                        return 1;
                    }
                }
            }
Reply
#2

1. IsPlayerInVehicle, You didn't put them in the vehicle. So try this:
Код:
if(dialogid == 2)
    {
        if(response)
        {
            new message[256+1];
            new DMV;
            if(listitem == 0)
            {
                format(message, 256, "You have chosen 'Drivers License' please drive carefully", listitem);
                SendClientMessage(playerid, 0xFFFFFFFF, message);
                DMV = AddStaticVehicle(405,-220.8077,1212.4143,19.6102,179.2256,24,1); //
               PutPlayerInVehicle(playerid, DMV, 0);
                {
                    if (IsPlayerInVehicle(playerid, DMV))
                    {
                        SetPlayerCheckpoint(playerid, -206.8228,1195.4480,19.4574, 3.0);
                        return 1;
                    }
                }
            }
Should work.
Reply
#3

Still no checkpoint
Reply
#4

Quote:
Originally Posted by iLcke
Посмотреть сообщение
1. IsPlayerInVehicle, You didn't put them in the vehicle. So try this:
Код:
if(dialogid == 2)
    {
        if(response)
        {
            new message[256+1];
            new DMV;
            if(listitem == 0)
            {
                format(message, 256, "You have chosen 'Drivers License' please drive carefully", listitem);
                SendClientMessage(playerid, 0xFFFFFFFF, message);
                DMV = AddStaticVehicle(405,-220.8077,1212.4143,19.6102,179.2256,24,1); //
               PutPlayerInVehicle(playerid, DMV, 0);
                {
                    if (IsPlayerInVehicle(playerid, DMV))
                    {
                        SetPlayerCheckpoint(playerid, -206.8228,1195.4480,19.4574, 3.0);
                        return 1;
                    }
                }
            }
Should work.
Nononoono, just no.


pawn Код:
if(dialogid == 2)
    {
        if(response)
        {
            new message[256+1];
            new DMV;
            if(listitem == 0)
            {
                format(message, 256, "You have chosen 'Drivers License' please drive carefully", listitem);
                SendClientMessage(playerid, 0xFFFFFFFF, message);
                DMV = AddStaticVehicle(405,-220.8077,1212.4143,19.6102,179.2256,24,1); //
                SetPlayerCheckpoint(playerid, -206.8228,1195.4480,19.4574, 3.0);
                return 1;
             }
         }
    }
Why did you want to check if the player was inside the vehicle when you like 1ms earlier put him in the car?
Reply
#5

pawn Код:
if(dialogid == 2)
{
    if(response)
     {
        new string[64], DMV;
        if(listitem == 0)
        {
            format(string, 64, "You have chosen 'Drivers License' please drive carefully", listitem);
            SendClientMessage(playerid, 0xFFFFFFFF, string);
            DMV = CreateVehicle(405,-220.8077,1212.4143,19.6102,179.2256,24,1, -1);
            if(IsPlayerInVehicle(playerid, DMV))
            {
                SetPlayerCheckpoint(playerid, -206.8228,1195.4480,19.4574, 3.0);
                return 1;
            }
        }
    }
}
Watch out your string sizes.. also you have to use CreateVehicle
Reply
#6

My apologies x3
I "correct" others, but still don't even look at the code myself..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)