Originally Posted by OTACON
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; }
|