Old 06-07-2009   #1
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
Chars spawn

How to spawn chars?
(With examples)
WNeZRoS is offline   Reply With Quote
Old 06-07-2009   #2
ZBRANIGAN
25 star general of D.O.O.P.
 
ZBRANIGAN's Avatar
 
Join Date: May 2008
Location: Breastiary, Nippopolis.
Posts: 82
ZBRANIGAN will become famous soon enoughZBRANIGAN will become famous soon enoughZBRANIGAN will become famous soon enoughZBRANIGAN will become famous soon enoughZBRANIGAN will become famous soon enoughZBRANIGAN will become famous soon enough
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?
ZBRANIGAN is offline   Reply With Quote
Old 06-07-2009   #3
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
I want to spawn characters in the script, but when spawning my game off. Therefore, I ask them how to do?
WNeZRoS is offline   Reply With Quote
Old 06-07-2009   #4
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,906
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
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.
__________________
rappo is offline   Reply With Quote
Old 06-07-2009   #5
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
I have a model for some reason do not load, and the cycle of the game hang
WNeZRoS is offline   Reply With Quote
Old 06-07-2009   #6
rappo
Professional Dumbass
 
rappo's Avatar
 
Join Date: Aug 2003
Location: Los Angeles
Posts: 6,906
rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.rappo is a God.
can you post your code?
__________________
rappo is offline   Reply With Quote
Old 06-07-2009   #7
WNeZRoS
Registered User
 
Join Date: May 2009
Posts: 19
WNeZRoS is an unknown quantity at this point
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?
WNeZRoS is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:53 PM.