Jump to content
  • 0

cum fac un pickup care te da intr`o masina?


Andr3y

Question

8 answers to this question

Recommended Posts

http://wiki.sa-mp.com/wiki/CreatePickup

                        +

http://wiki.sa-mp.com/wiki/OnPlayerPickUpPickup

                        +

http://wiki.sa-mp.com/wiki/CreateVehicle

                        +

http://wiki.sa-mp.com/wiki/PutPlayerInVehicle

Daca nici asa nu ai inteles ...

Link to comment
Share on other sites

Pui doar PutPlayerInVehicle(playerid,vehicleid,0);

Si e bune cum a spus stuntman: mai intai creezi pickapul,apoi OnPlayerPickUpPickup-ca atunci cand e in pickap sa se intaple ceva...in asta bagi :CreateVehichle sa se faca masina apoi PutPlayerInVehicle ca sa il puna in masina

Link to comment
Share on other sites

DJ_Dany Din cate inteleg din ce ai zis tu acolo sa creeze pickupu iar dupa aceea sa scrie putplayer in vehicle... complet gresit ca iti trebuie o comanda care trebuie sa o dai in acel pickup .... eu in locul lui Andr3y as face asa

  :undecided:  :wink:

Faci un AddStaticPickup (1239, 2, xx,yy,zz);

Si dupa o comanda :

if(strcmp(cmd, "/masina", true) == 0)

    {

if(IsPlayerConnected(playerid))

{

    if(PlayerToPoint(3.0,playerid,corodonatele care le-ai pus si la pickup xx,yy,zz))

    {

    //PutPlayerInVehicle(playerid,id masini, 0); // 0 reprezinta locul unde sa il dea in masina mai exact la volan

    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Esti in masina ");

  }

}

else

{

    SendClientMessage(playerid, COLOR_GRAD1, "  Masina este luata !");

    return 1;

}

}

return 1;

}

Daca gresesc undeva spunetimi va rog frumos. Sper sa iti fie de folos!

  :-)

Link to comment
Share on other sites

DJ_Dany Din cate inteleg din ce ai zis tu acolo sa creeze pickupu iar dupa aceea sa scrie putplayer in vehicle... complet gresit ca iti trebuie o comanda care trebuie sa o dai in acel pickup .... eu in locul lui Andr3y as face asa

  :undecided:  :wink:

Faci un AddStaticPickup (1239, 2, xx,yy,zz);

Si dupa o comanda :

if(strcmp(cmd, "/masina", true) == 0)

    {

if(IsPlayerConnected(playerid))

{

    if(PlayerToPoint(3.0,playerid,corodonatele care le-ai pus si la pickup xx,yy,zz))

    {

    //PutPlayerInVehicle(playerid,id masini, 0); // 0 reprezinta locul unde sa il dea in masina mai exact la volan

    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Esti in masina ");

  }

}

else

{

    SendClientMessage(playerid, COLOR_GRAD1, "  Masina este luata !");

    return 1;

}

}

return 1;

}

Daca gresesc undeva spunetimi va rog frumos. Sper sa iti fie de folos!

  :-)

WTF ?

Ia mura-n gura, cum va place voua:

[pawn]//Sus in script

new CarPickup, pVehicle[ MAX_PLAYERS ];

//Sub OnPlayerConnect

pVehicle[ playerid ] = -1;

//Sub OnPlayerDisconnect

if( pVehicle[ playerid ] != -1 ) DestroyVehicle( pVehicle[ playerid ] );

//Sub OnGameModeInit

CarPickup = CreatePickup( modelpickup, tip, X, Y, Z, -1 ); //MODIFICA

//Sub OnPlayerPickUpPickup

if( pickupid == CarPickup )

{

    pVehicle[ playerid ] = CreateVehicle( model_vehicul, X, Y, Z, rX, rY, rZ, respawn_time ); //MODIFICA

    PutPlayerInVehicle( playerid, pVehicle[ playerid ], 0 );

}

[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.