Why the object does not appears ? - 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: Why the object does not appears ? (
/showthread.php?tid=277793)
Why the object does not appears ? -
Vukilore - 19.08.2011
Hi man !
I've made a a command who wright the coordinate in a .pwn and create an object in the same place.
The file is perfectly wright during the command but the object does not appaer !
Why ?
There is the code:
pawn Код:
COMMAND:zparthead(playerid, params[])
{
if(IsPlayerLuxAdminLevel(playerid,5))
{
if(ondebug[playerid] == 1)
{
new filename[] = "/zpart.pwn";
if(!fexist(filename))
{
new File:ivo = fopen(filename, io_write);
fwrite(ivo, "//Partie crйй:");
fclose(ivo);
}
new comment[64], codeline[256];
if(sscanf(params, "s[64]", comment)) { comment = "N/A"; SendClientMessage(playerid, COLOR_YELLOW, "[!] Vous pouvez utiliser /zparthead [commentaire]."); }
new File:zpart = fopen(filename, io_append);
new Float:x4;
new Float:y4;
new Float:z4;
new Float:zground;
GetPlayerPos(playerid, x4, y4, z4);
GetPointZPos(x4, y4, zground);
format(codeline, sizeof(codeline), "\r\n\r\nCreateDynamicObject(2908,%f,%f,%f,0.0,0.0,0.0); // <%s><Partie: tкte>", x4, y4, zground, comment);
fwrite(zpart, codeline);
CreateObject(2908,x4,y4,zground,0.0,0.0,0.0); // HERE THE CODE WHO SPAWN THE OBJECT AT THE FOOT OF PLAYER
}
else return SendClientMessage(playerid, COLOR_RED,"[x] Vous n'кtes pas en mode debug");
}
return 1;
}
Why the object does not appaer at the foot of the player ?
Thank's alot man !
Re: Why the object does not appears ? -
Amel_PAtomAXx - 19.08.2011
i think that CreateDynamicObject doesn't work when you trying to add them in game.
I had same problem with neon system.
Re : Why the object does not appears ? -
Vukilore - 19.08.2011
It's a createobject :O
The createdynamicobject is in the file.
But thank's
Re: Why the object does not appears ? -
Amel_PAtomAXx - 19.08.2011
pawn Код:
CreateObject(2908,x4,y4,z4,0.0,0.0,0.0,350.0); // You forgot to add DrawDistance