SA-MP Forums Archive
/call hydra - 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: /call hydra (/showthread.php?tid=247836)



/call hydra - =AV=Gibson - 10.04.2011

Hey guys currently i have a command called /call hydra that when used it will CreateVehicle and place you inside it. But i'm struggling to work out how to stop it respawning....

E.g. if a player /call hydra and for example crashes into a building that vehicle is gone and will not reappear on the Carrier.

Here is the command code at the moment.

pawn Код:
if(strcmp(cmdtext, "/call hydra", true) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7, 2728.0461,-2302.7786,16.5892))
    {
    GetPlayerPos(playerid,X,Y,Z);
    PutPlayerInVehicle(playerid, CreateVehicle(520,X,Y,Z,0,-1,-1,-1),0);
    return 1;
    }
}



Re: /call hydra - Tommy_Mandaz - 11.04.2011

Try adding a AddStaticVehicleEx (520, X, Y, Z, 0, 0, 0, 900)


Re: /call hydra - =AV=Gibson - 11.04.2011

Will Do.

I will post back the results


Re: /call hydra - =AV=Gibson - 11.04.2011

Nope.. That didn't work either.

pawn Код:
if(strcmp(cmdtext, "/call hydra", true) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7, 2728.0461,-2302.7786,16.5892))
    {
    GetPlayerPos(playerid,X,Y,Z);
    PutPlayerInVehicle(playerid, AddStaticVehicleEx (520, X, Y, Z, 0, 0, 0, 900);
    return 1;
    }
}
Heres the updated code. Unless you mean... AddStaticVehicle and then call the vehicles ID to the spot..


Respuesta: /call hydra - usrb1n - 11.04.2011

pawn Код:
if(strcmp(cmdtext, "/callhydra", true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 7, 2728.0461,-2302.7786,16.5892))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        new hydra = AddStaticVehicleEx(520, x, y, z, 0, 1, 1, 240);
        PutPlayerInVehicle(playerid, hydra, 0);
        return 1;
    }
}
Note: I used "/callhydra" not "/call hydra".


Re: /call hydra - Mean - 11.04.2011

If you want to use spaces ( /call hydra ) I think you MUST use:
pawn Код:
if(strcmp(cmdtext, "/call", true) == 0)
{
    if( !strcmp( cmdtext[ 6 ], "hydra", true, 5 ) )
    {
        if(IsPlayerInRangeOfPoint(playerid, 7, 2728.0461,-2302.7786,16.5892))
        {
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            new hydra = AddStaticVehicleEx(520, x, y, z, 0, 1, 1, 240);
            return PutPlayerInVehicle(playerid, hydra, 0);
        }
    }
    else return SendClientMessage( playerid, 0xAAAAAA, "USAGE: /call hydra" );
}