SA-MP Forums Archive
crear auto al spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: crear auto al spawn (/showthread.php?tid=372237)



crear auto al spawn - chucho - 25.08.2012

quiero saber como hacer para que cree el auto en donde aparesca al jugador, este es mi codigo
pawn Код:
if(strcmp(cmdtext,"/comando",true))
    {
    new randomspawn = random(12);
    switch(randomspawn)
    {
            case 0: SetPlayerPos(playerid, 0000,0000,0000);
            case 1: SetPlayerPos(playerid, 0000,0000,0000);
            case 2: SetPlayerPos(playerid, 0000,0000,0000);
    }
 new Float:x, Float:y, Float:z, Float:angle;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, angle);
   
new vzu=CreateVehicle(111, x, y, z, angle, -1, -1, -1);
    PutPlayerInVehicle(playerid, vzu, 0);
    return 1;}



Respuesta: crear auto al spawn - OTACON - 25.08.2012

el comando esta bien, asi seria, ke le pasa, no funciona, o tira algun error ?


Respuesta: crear auto al spawn - Vladeksh - 25.08.2012

Debiese ser
pawn Код:
if(!strcmp(cmdtext,"/comando",true))
// o
if(strcmp(cmdtext,"/comando",true) == 0)



Respuesta: crear auto al spawn - chucho - 25.08.2012

si funciona, crea el auto pero no lo teletransporta!


Respuesta: crear auto al spawn - OTACON - 26.08.2012

Estas colocando las coordenada 0000,0000,0000 ? Hay no lo esta Teletransportando a ningun lado :S.


Respuesta: crear auto al spawn - Jovanny - 26.08.2012

Estas poniendo un id de auto que no existe
Код:
111



Respuesta: crear auto al spawn - OTACON - 26.08.2012

ah.. eso tambien :S los vehiculos comienzan desde el id 400
https://sampwiki.blast.hk/wiki/Vehicles:All