SA-MP Forums Archive
Wtf is wrong here?:@ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wtf is wrong here?:@ (/showthread.php?tid=185226)

Pages: 1 2


Wtf is wrong here?:@ - ColdXX - 23.10.2010

The problem is that when i enter the First Pickup nothing happens!
When i enter the second it does what it was suposed to do on the first one!

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
    GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
    }
    SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
    }
   
    if(pickupid == ppult1)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
    GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
    }
    SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
    }
    return 1;
}



Re: Wtf is wrong here?:@ - Linow - 23.10.2010

Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
    GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
    }
    SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
    }
   
    else if(pickupid == ppult1)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
    GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
    }
    SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
    }
    return 1;
}



Re: Wtf is wrong here?:@ - ColdXX - 23.10.2010

Quote:
Originally Posted by Linow
Посмотреть сообщение
Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
    GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
    }
    SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
    }
   
    else if(pickupid == ppult1)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
    GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
    }
    SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
    }
    return 1;
}
There's no difference...;\


Re: Wtf is wrong here?:@ - Linow - 23.10.2010

Try using in OnPlayerPickUpPickup.

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
    GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
    }
    SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
    }
   
    else if(pickupid == ppult1)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else if(IsPlayerInAnyVehicle(playerid))
    {
    MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
    GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
    }
    SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
    }
    return 1;
}



Re: Wtf is wrong here?:@ - deviljingoku - 23.10.2010

Quote:
Originally Posted by ColdXX
Посмотреть сообщение
looking for Good Photoshop User
..;\
i'm good photoshop user.and check my new thread guys i have compiling problem in pawno.


Re: Wtf is wrong here?:@ - Brian_Furious - 23.10.2010

What errors do you have?


Respuesta: Wtf is wrong here?:@ - The_Moddler - 23.10.2010

You confused pickups ids.. look at them.


Re: Respuesta: Wtf is wrong here?:@ - ColdXX - 23.10.2010

Quote:
Originally Posted by Brian_Furious
Посмотреть сообщение
What errors do you have?
No errors

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
You confused pickups ids.. look at them.
no i havent?o.O


Re: Wtf is wrong here?:@ - Brian_Furious - 23.10.2010

Are you using Incognito's streamer?


Re: Wtf is wrong here?:@ - ColdXX - 23.10.2010

Yes i Do!


Re: Wtf is wrong here?:@ - Brian_Furious - 23.10.2010

Try this:

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else
    {
    MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
    GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
    }
    SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
    }
   
    if(pickupid == ppult1)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
    }
    else
    {
    MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
    GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
    }
    SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
    }
    return 1;
}



Re: Wtf is wrong here?:@ - ColdXX - 23.10.2010

Its not working! I had the same at the first time!
BTW the
pawn Код:
GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
Its not showing eighter!


Re: Wtf is wrong here?:@ - Brian_Furious - 23.10.2010

if no try this:

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
        if(!IsPlayerInAnyVehicle(playerid))
        {
            SetTimerEx("moveobj2", 5000, true, "is", 1337, "hello!");
            return 1;
        }
        else
        {
            GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
            return 1;
        }
    }
    if(pickupid == ppult1)
    {
         if(!IsPlayerInAnyVehicle(playerid))
         {
               SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
         }
         else
         {
              GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
         }
         return 1;
    }
}

forward moveobj2();
public moveobj2()
{
    MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
    GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
    return true;
}

forward moveobj1();
public moveobj1()
{
    MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
    GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
    SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
    return true;
}



Re: Wtf is wrong here?:@ - Mike_Peterson - 23.10.2010

ugh... mixed some did some things... i cant test it though but no errors...
Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
if(pickupid == ppult)
{
if(!IsPlayerInAnyVehicle(playerid)) return GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
else
{
MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
}
return 1;
}
if(pickupid == ppult1)
{
if(!IsPlayerInAnyVehicle(playerid)) return GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
else
{
MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
}
return 1;
}
return 1;
}
I dont expect it to work..


Re: Wtf is wrong here?:@ - ColdXX - 23.10.2010

I have tried that mike! Not working!
And Brian...the Timer im using when the player enters the PICKUP is to place the Object to its initial coords!
I might use checkpoints...:@


Re: Wtf is wrong here?:@ - ColdXX - 23.10.2010

It does the same shit when im using Checkpoints wtf!:@


Re: Wtf is wrong here?:@ - Badger(new) - 23.10.2010

Try this and show me a picture of what it says.
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == ppult)
    {
        SendClientMessage(playerid,0xFFFFFFFF,"You picked up pickup ppult!");
        if(!IsPlayerInAnyVehicle(playerid))GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
        else if(IsPlayerInAnyVehicle(playerid))
        {
            MoveDynamicObject(pult,369.54037475586, 2448.9484863281, 45.554733276367,2);
            GameTextForPlayer(playerid,"~g~Going to ~p~the moon",4000,3);
            SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
            SendClientMessage(playerid,0xFFFFFFFF,"ppult's effects!");
        }
        SetTimerEx("moveobj", 5000, true, "is", 1337, "hello!");
    }
   
    if(pickupid == ppult1)
    {
        SendClientMessage(playerid,0xFFFFFFFF,"You picked up pickup ppult1!");
        if(!IsPlayerInAnyVehicle(playerid))GameTextForPlayer(playerid,"~r~You must be in a vehicle",4000,3);
        else if(IsPlayerInAnyVehicle(playerid))
        {
            MoveDynamicObject(pult1,1283.3358154297, 1286.4405517578, 29.590309143066,2);
            GameTextForPlayer(playerid,"~g~Through ~p~the tunnel",4000,3);
            SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 7.0);
            SendClientMessage(playerid,0xFFFFFFFF,"ppult1's effects!");
        }
        SetTimerEx("moveobj1", 5000, true, "is", 1337, "hello!");
    }
    return 1;
}



Re: Wtf is wrong here?:@ - Badger(new) - 23.10.2010

Sorry the forums went down for me.
So I accidently double posted.


Re: Wtf is wrong here?:@ - ColdXX - 23.10.2010

There is nothing to show

When i enter the first pickup it doesnt do anything!
When i enter the second one it doesn what it was supposed to be done when entering the first 1!


Re: Wtf is wrong here?:@ - Badger(new) - 23.10.2010

What I added means debugging would be a bit easier.

If what you say is true, then where you created the pickup "ppult", you didn't assign ppult the ID.
If you did, it would say "You picked up pickup ppult!".

And then if the second one does what the first one should, you gave the second pickup (ppult1) the ID ppult was supposed to have and it would then say:
"You picked up pickup ppult!"
"ppult's effects!"