diff --git a/saco/cmdprocs.cpp b/saco/cmdprocs.cpp index b3ebf41..9114eda 100644 --- a/saco/cmdprocs.cpp +++ b/saco/cmdprocs.cpp @@ -238,7 +238,39 @@ void cmdPlayerSkin(PCHAR szCmd) void cmdCreateVehicle(PCHAR szCmd) { - // TODO: cmdCreateVehicle .text:10068D70 + if(tSettings.bDebug) + { + if(!strlen(szCmd)) + { + pChatWindow->AddDebugMessage("Usage: /v (vehicle id)."); + } + else + { + int iModel = atoi(szCmd); + if(pGame->sub_100A0930()) + { + pGame->sub_100A0940(iModel, 2); + pGame->sub_100A0960(); + CPlayerPed *pPlayerPed = pGame->FindPlayerPed(); + if(pPlayerPed) + { + MATRIX4X4 mat; + pPlayerPed->GetMatrix(&mat); + char szName[9] = {0}; + sprintf(szName, "TYPE_%d", iModel); + pGame->sub_100A0250(iModel, mat.pos.X - 5.0f, mat.pos.Y - 5.0f, mat.pos.Z + 1.0f, 0, 0)->Add(); + } + else + { + pChatWindow->AddDebugMessage("I couldn't find the player actor."); + } + } + else + { + pChatWindow->AddDebugMessage("game not loaded."); + } + } + } } void cmdSelectVehicle(PCHAR szCmd) diff --git a/saco/game/game.h b/saco/game/game.h index 7670294..0eb6cb0 100644 --- a/saco/game/game.h +++ b/saco/game/game.h @@ -146,11 +146,13 @@ public: BYTE sub_100A00C0(); void sub_100A0110(); void sub_100A0210(); - void sub_100A0250(); + CVehicle *sub_100A0250(int a1, float a2, float a3, float a4, int a5, int a6); void sub_100A02E0(); void sub_100A0310(); void sub_100A0330(); BOOL sub_100A0930(); + void sub_100A0940(int a1, int a2); + void sub_100A0960(); void sub_100A1C10();