Opposite
#1

When i use /balloon command so the balloon does not appear but when i try destroy balloon,it appears

Код:
CMD:balloon(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] == 7)
	{
		if(PlayerInfo[playerid][pVip] == 0) return 0;

	    new Float:x,Float:y,Float:z;
	    GetPlayerPos(playerid, x, y, z);
	    SetPlayerPos(playerid, x, y, z+3.5);

	    new world = GetPlayerVirtualWorld(playerid);
		new	interior = GetPlayerInterior(playerid);

	    //CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD);
	    Balloon[playerid] = CreateDynamicObject(19335, x, y, z, 0.0,0.0,0.0, world, interior);
	    Fire[playerid] = CreateDynamicObject(18692, x, y, z, 0.0, 0.0, 0.0, world, interior);
	    Fire1[playerid] = CreateDynamicObject(18692, x, y, z,0.0,0.0,0.0, world, interior);

	    //AttachDynamicObjectToObject(STREAMER_TAG_OBJECT objectid, attachtoid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz, syncrotation = 1);
	    AttachDynamicObjectToObject(Fire[playerid], Balloon[playerid], 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1);
	    AttachDynamicObjectToObject(Fire1[playerid], Balloon[playerid], 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 1);

	    SendClientMessage(playerid,COLOR_GREENZ,"Use the following keys to control the controllable object");
	    SendClientMessage(playerid,COLOR_GREENZ,"~k~~PED_SPRINT~+~k~~CONVERSATION_YES~ (Move Balloon Up)");
	    SendClientMessage(playerid,COLOR_GREENZ,"~k~~PED_SPRINT~+~k~~CONVERSATION_NO~ (Move Balloon Down)");
	    SendClientMessage(playerid,COLOR_GREENZ,"~k~~VEHICLE_ENTER_EXIT~+~k~~CONVERSATION_YES~ (Move Balloon Forward)");
	    SendClientMessage(playerid,COLOR_GREENZ,"~k~~VEHICLE_ENTER_EXIT~+~k~~CONVERSATION_NO~ (Move Balloon Back)");
	    SendClientMessage(playerid,COLOR_GREENZ,"~k~~SNEAK_ABOUT~+~k~~CONVERSATION_NO~ (Move Balloon Left)");
	    SendClientMessage(playerid,COLOR_GREENZ,"~k~~SNEAK_ABOUT~+~k~~CONVERSATION_YES~ (Move Balloon Right)");
	    PlayerIn[playerid][BalloonPlayer] = 1;
    }
    return 1;
}

CMD:destroyballoon(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] == 7) {
	if(PlayerIn[playerid][BalloonPlayer] == 0) return GameTextForPlayer(playerid,"~g~you dident spawned any balloon",4500,3);
    DestroyObject(Balloon[playerid]);
    DestroyObject(Fire[playerid]);
    DestroyObject(Fire1[playerid]);
    PlayerIn[playerid][BalloonPlayer] = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Opposite - by Fancy - 06.08.2015, 09:26
Re: Opposite - by Gammix - 06.08.2015, 10:52
Re: Opposite - by Fancy - 06.08.2015, 11:38
Re: Opposite - by MarvinPWN - 06.08.2015, 11:47
Re: Opposite - by Fancy - 06.08.2015, 12:22
Re: Opposite - by MarvinPWN - 06.08.2015, 12:28
Re: Opposite - by Fancy - 06.08.2015, 12:41

Forum Jump:


Users browsing this thread: 5 Guest(s)