PDA

View Full Version : Objects does not appear


Fancy
29/07/2015, 01:12 PM
CMD:balloon(playerid,params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
DestroyObject(Balloon[playerid]);
DestroyObject(Fire[playerid]);
DestroyObject(Fire1[playerid]);
PlayerIn[playerid][BalloonPlayer] = 0;
Balloon[playerid] = CreateObject(19335, x, y, z+3, 0.00, 0.00, 0.00);
Fire[playerid] = CreateObject(18692, 0,0,0, 0.00, 0.00, 0.00);
Fire1[playerid] = CreateObject(18692, 0,0,0, 0.00, 0.00, 0.00);
AttachObjectToObject(Fire[playerid], Balloon[playerid], 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1);
AttachObjectToObject(Fire1[playerid], Balloon[playerid], 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 1);
SetPlayerPos(playerid,x,y,z+3.5);
return 1;
}

I made a balloon command but the objects does not appear.

Variable™
29/07/2015, 02:25 PM
Removed

Fancy
29/07/2015, 03:22 PM
CMD:balloon(playerid,params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
PlayerIn[playerid][BalloonPlayer] = 0;
Balloon[playerid] = CreateObject(19335, x, y, z+3, 0.00, 0.00, 0.00);
Fire[playerid] = CreateObject(18692, 0,0,0, 0.00, 0.00, 0.00);
Fire1[playerid] = CreateObject(18692, 0,0,0, 0.00, 0.00, 0.00);
AttachObjectToObject(Fire[playerid], Balloon[playerid], 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1);
AttachObjectToObject(Fire1[playerid], Balloon[playerid], 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 1);
SetPlayerPos(playerid,x,y,z+3.5);
return 1;
}

Try this.

Nop,dosent worked

Kaliber
29/07/2015, 03:38 PM
Do it like this:

CMD:balloon(playerid,params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
DestroyObject(Balloon[playerid]), DestroyObject(Fire[playerid]),DestroyObject(Fire1[playerid]);
PlayerIn[playerid][BalloonPlayer] = 0;
Balloon[playerid] = CreateObject(19335, x, y, z+3, 0.00, 0.00, 0.00);
Fire[playerid] = CreateObject(18692, x,y,z, 0.00, 0.00, 0.00);
Fire1[playerid] = CreateObject(18692, x,y,z, 0.00, 0.00, 0.00);
AttachObjectToObject(Fire[playerid], Balloon[playerid], 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1);
AttachObjectToObject(Fire1[playerid], Balloon[playerid], 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 1);
SetPlayerPos(playerid,x,y,z+3.5);
return 1;
}

Variable™
29/07/2015, 04:17 PM
Removed

Fancy
29/07/2015, 05:57 PM
Balloon[playerid] = CreateObject(19335, x, y, z+3, 0.00, 0.00, 0.00);
Fire[playerid] = CreateObject(18692, x ,y ,z , 0.00, 0.00, 0.00);
Fire1[playerid] = CreateObject(18692, x, y, z, 0.00, 0.00, 0.00);

This will work D':
Nop.