28.07.2015, 10:35
Код:
CMD:balloon(playerid,params[]) { if(PlayerInfo[playerid][pVip] == 0) return 0; new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x, y, z); DestroyObject(Balloon); DestroyObject(Fire); DestroyObject(Fire1); PlayerIn[playerid][BalloonPlayer] = 0; Balloon = CreateObject(19335, x, y, z+3, 0.00, 0.00, 0.00); Fire = CreateObject(18692, 0,0,0, 0.00, 0.00, 0.00); Fire1 = CreateObject(18692, 0,0,0, 0.00, 0.00, 0.00); AttachObjectToObject(Fire, Balloon, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1); AttachObjectToObject(Fire1, Balloon, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 1); SetPlayerPos(playerid,x,y,z+3.5); SendClientMessage(playerid,COLOR_GREENZ,"Press the following keys to control the hot air balloon"); 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(PlayerIn[playerid][BalloonPlayer] == 0) return GameTextForPlayer(playerid,"~g~you dident spawned any balloon",4500,3); DestroyObject(Balloon); DestroyObject(Fire); DestroyObject(Fire1); PlayerIn[playerid][BalloonPlayer] = 0; return 1; }