[Help] Object/item ectra spawn on player spawn? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Object/item ectra spawn on player spawn? (
/showthread.php?tid=122225)
[Help] Object/item ectra spawn on player spawn? -
No-Half-Measures - 20.01.2010
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?
Re: Object/item ectra spawn on player spawn? -
Joe Staff - 20.01.2010
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;
}
Re: Object/item ectra spawn on player spawn? -
No-Half-Measures - 20.01.2010
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.
Re: [Help] Object/item ectra spawn on player spawn? -
No-Half-Measures - 21.01.2010
Need some help Please