SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 20/01/2010, 08:28 PM   #1
No-Half-Measures
Little Clucker
 
No-Half-Measures's Avatar
 
Join Date: Jan 2010
Location: Owl City :D
Posts: 12
Reputation: 0
Default [Help] Object/item ectra spawn on player spawn?

How would i make it so that a object would spawn when the player spawns if its possible?

I imagined it somthing like this but thats incorrect;

Code:
public OnPlayerSpawn(playerid)
{
Createobi (0,0,0,0,0,0);
return 1;
}
Quote:
createobi allready defined in the script
so yh is there any way to make an object spawn when a player spawns?
__________________

No-Half-Measures is offline  
Old 20/01/2010, 08:31 PM   #2
Joe Staff
High-roller
 
Joe Staff's Avatar
 
Join Date: Aug 2007
Posts: 2,567
Reputation: 377
Default Re: Object/item ectra spawn on player spawn?

Your excess of spelling errors and grammar mistakes lead me to believe you don't understand programming completely... or much at all.

All functions have to be spelled correctly and are case-sensitive.

pawn Code:
new pObject[playerid];
public OnPlayerSpawn(playerid)
{
  if(IsValidObject(pObject[playerid]))DestroyObject(pObject[playerid]); //If the object already exists, delete it.
  pObject[playerid]=CreateObject(1385,0,0,0,0,0,0);
  return 1;
}
__________________
Big bottom girls make this rockin' world go 'round.
Joe Staff is offline  
Old 20/01/2010, 09:35 PM   #3
No-Half-Measures
Little Clucker
 
No-Half-Measures's Avatar
 
Join Date: Jan 2010
Location: Owl City :D
Posts: 12
Reputation: 0
Default Re: Object/item ectra spawn on player spawn?

Firstly:
wow some small spelling and grammar mistakes but easily understood if you used your brain.
I also know code is case sensitive and to be spelt correctly, if you actually look at the code there is no mistakes just "Createobi" in which you did not know what it was.

Secondly:
I should have explained a bit more,

My "Createobi" is several objects placed together to create something, not saying what at the moment but i need the group of objects to spawn when a player spawns but not on the player infact else were on the map also i do not need destroy object if to many or already exists as i have my own function already built into my script that does that for when i was testing it.
__________________

No-Half-Measures is offline  
Old 21/01/2010, 10:38 AM   #4
No-Half-Measures
Little Clucker
 
No-Half-Measures's Avatar
 
Join Date: Jan 2010
Location: Owl City :D
Posts: 12
Reputation: 0
Default Re: [Help] Object/item ectra spawn on player spawn?

Need some help Please
__________________

No-Half-Measures is offline  
 

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Item random spawn Geekzor Help Archive 8 10/08/2009 09:11 PM
Spawn Object Behind Player Yuryfury Help Archive 2 20/06/2009 11:37 PM
[FilterScript] [FS] Los Santos Spawn Object Frikandel Filterscripts 3 10/05/2009 06:17 PM
How to make a object spawn back, when you have smashed it aspire5630 Help Archive 10 17/04/2009 08:25 PM
Spawn an object in the Air Trooper[Y] Help Archive 3 13/04/2009 03:14 PM


All times are GMT. The time now is 09:18 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.