SA-MP Forums Archive
Can anyone help me? - 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)
+--- Thread: Can anyone help me? (/showthread.php?tid=322155)



Can anyone help me? - scorpionking674 - 01.03.2012

When some new player login into my server, the tutorial text doesnt go away. And how do i add script for vehicle storage? the vehicle should spawn where it was last parked.


Re: Can anyone help me? - vakhtang - 01.03.2012

So the textdraw does not disappear when tutorial is over? add TextdrawHideForPlayer(playerid, textdraw); And for the vehicle there should be SetVehicleParamsForPlayer [see here]


Re: Can anyone help me? - vakhtang - 01.03.2012

Ups sorry the vehicle params are wrong I dont really know how to save new position try making new Float ,Float:y, Float:z; and for ceach player each and when they park the vehicle save x y z and delete and create the vehicle at x y z


Re: Can anyone help me? - vakhtang - 01.03.2012

Try testing this:
pawn Код:
#include <a_samp>

new Float:Vx[MAX_VEHICLES], Float:Vy[MAX_VEHICLES], Float:Vz[MAX_VEHICLES];

new Vehicle[MAX_VEHICLES];

public OnFilterScriptInit()
{
    Vehicle[0] = CreateVehicle(555, 0.0, 0.0, 0.0, 0.0, 0, 1, 60);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/parked", cmdtext, true, 10) == 0)
    {
        new VID;
        VID = GetPlayerVehicleID(playerid);
        DestroyVehicle(VID);
        Vehicle[VID] = CreateVehicle(555, Vx[VID], Vy[VID], Vz[VID], 0.0, 0, 1, 60);
        return 1;
    }
    return 0;
}



Re: Can anyone help me? - scorpionking674 - 01.03.2012

Quote:
Originally Posted by vakhtang
Посмотреть сообщение
Try testing this:
pawn Код:
#include <a_samp>

new Float:Vx[MAX_VEHICLES], Float:Vy[MAX_VEHICLES], Float:Vz[MAX_VEHICLES];

new Vehicle[MAX_VEHICLES];

public OnFilterScriptInit()
{
    Vehicle[0] = CreateVehicle(555, 0.0, 0.0, 0.0, 0.0, 0, 1, 60);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/parked", cmdtext, true, 10) == 0)
    {
        new VID;
        VID = GetPlayerVehicleID(playerid);
        DestroyVehicle(VID);
        Vehicle[VID] = CreateVehicle(555, Vx[VID], Vy[VID], Vz[VID], 0.0, 0, 1, 60);
        return 1;
    }
    return 0;
}
i need a script that will display menu of my vehicles when i type vstorage. and the vehicle can only be spawned on last PARK position. and also can be despawned. thanks for replying everyone. im really noob guys. so can u create a text box and the script you made up here?