GTAGaming Forums

GTAGaming Forums (http://www.gtagaming.com/forums/index.php)
-   Grand Theft Auto IV Mods (http://www.gtagaming.com/forums/forumdisplay.php?f=318)
-   -   Chars spawn (http://www.gtagaming.com/forums/showthread.php?t=116207)

WNeZRoS 06-07-2009 05:52 AM

Chars spawn
 
How to spawn chars?
(With examples)

ZBRANIGAN 06-07-2009 06:03 AM

Cheat: Spawn Cars

Any time you're outside, break out your cell phone and insert the following phone numbers to unlock the vehicles listed.

* Annihilator (Helicopter) - (359)-555-0100
* Cognoscenti (Car) - (227)-555-0142
* Comet (Car) - (227)-555-0175
* FIB Buffalo (Car) - (227)-555-0100
* Jetmax (Boat) - (938)-555-0100
* NRG-900 (Motorcycle) - (625)-555-0100
* Sanchez (Car) - (625)-555-0150
* Super GT (Car) - (227)-555-0168
* Turismo (Car) - (227)-555-0147

or do you mean characters?

WNeZRoS 06-07-2009 06:16 AM

I want to spawn characters in the script, but when spawning my game off. Therefore, I ask them how to do?

rappo 06-07-2009 12:20 PM

You use the CreateChar function, but first you need to request the model and then wait until it's loaded, otherwise your game will crash. This example is using the CustomFiberThread, you CANNOT put the while loop in CustomThread, it has to be CustomFiberThread:

Code:

eModel pedModel = MODEL_IG_RICKY;
Ped ped;

RequestModel(pedModel);

while(!HasModelLoaded(pedModel)) {
  wait(0);
}

CreateChar(26, pedModel, x + 2, y + 2, z, &ped, 0);

The x, y, and z are just the coordinates of Niko, and you can put +2 so that they don't spawn right on top of you. That example will spawn the Ricky Gervais model, but there's a huge list of all the models inside ScriptHook/ScriptingEnums.h file.

If you need some more help with it, I can give you my full Bodyguard Mod source code.

WNeZRoS 06-07-2009 10:56 PM

I have a model for some reason do not load, and the cycle of the game hang

rappo 06-07-2009 11:22 PM

can you post your code?

WNeZRoS 06-07-2009 11:32 PM

Code:

if ((GetAsyncKeyState(50) & 1) != 0) //2
{
        eModel pedModel = MODEL_IG_RICKY;
        Ped ped;

        RequestModel(pedModel);

        while(!HasModelLoaded(pedModel)) {
                Wait(0);
        }

        CreateChar(26, pedModel, -224.406f, 945.445f, 10.9129f, &ped, 0);
}

Can you give me your icq number or write me at 6361233?


All times are GMT -6. The time now is 08:50 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.