[Duda cуmo modificar este cmd?
#2

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
new VehiculoCreado[MAX_PLAYERS];

COMMAND:veh(playerid, params[]) {
    if(sscanf(params,"d",params[0])) return SendClientMessage(playerid,-1,"INFO: escribe el comando: /veh [id vehiculo]");
    new Float:posicion[4];
    GetPlayerPos(playerid,posicion[0],posicion[1],posicion[2]);
    GetPlayerFacingAngle(playerid,posicion[3]);
    DestroyVehicle(VehiculoCreado[playerid]);
    VehiculoCreado[playerid]=CreateVehicle(params[0],posicion[0],posicion[1],posicion[2],posicion[3],random(200),random(200),999999);
    PutPlayerInVehicle(playerid,VehiculoCreado[playerid],0);
    return true;
}
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
new VehiculoCreado[MAX_PLAYERS];

COMMAND:veh(playerid, params[]) {
    if(sscanf(params,"dddd",params[0],params[1],params[2],params[3])) return SendClientMessage(playerid,-1,"INFO: escribe el comando: /veh [id vehiculo] [color 1] [color 2] [respawn delay]");
    new Float:posicion[4];
    GetPlayerPos(playerid,posicion[0],posicion[1],posicion[2]);
    GetPlayerFacingAngle(playerid,posicion[3]);
    DestroyVehicle(VehiculoCreado[playerid]);
    VehiculoCreado[playerid]=CreateVehicle(params[0],posicion[0],posicion[1],posicion[2],posicion[3],params[1],params[2],params[3]);
    PutPlayerInVehicle(playerid,VehiculoCreado[playerid],0);
    return true;
}
Reply


Messages In This Thread
[Duda cуmo modificar este cmd? - by RZoone - 11.01.2014, 15:00
Respuesta: [Duda cуmo modificar este cmd? - by OTACON - 11.01.2014, 15:50
Respuesta: [Duda cуmo modificar este cmd? - by RZoone - 11.01.2014, 18:21

Forum Jump:


Users browsing this thread: 1 Guest(s)