Дмитрий
Дата: Вторник, 26.02.2013, 14:18 | Сообщение # 1 | Сообщить о нерабочей теме
Регистрация: 03.12.2011
Страна: Российская Федерация
Репутация:
14
Сообщений: 1421
Награды:
4
+
Статус:
Видео: VIDEO Код
new gamebuy; new shopgame[2]; new vehgame[MAX_PLAYERS];
Цитата
В OnPlayerPickUpPickup
Код
if(pickupid == shopgame[0]) { SetPlayerPos(playerid,-2237.2378,135.6198,1035.4141); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,6); SetPlayerVirtualWorld(playerid, 1); } if(pickupid == shopgame[1]) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); } if(pickupid == gamebuy) { ShowPlayerDialog(playerid,1456,DIALOG_STYLE_LIST,"Магазин игрушек","1.RC Bandit {4FFC15}1000${FFFFFF}\n2.RC Baron {4FFC15}2800${FFFFFF}\n3.RC Raider {4FFC15}2500${FFFFFF}\n4.RC Goblin {4FFC15}2600${FFFFFF}\n5.RC Tiger {4FFC15}6200${FFFFFF}\n6.RC Cam {4FFC15}800${FFFFFF}","Купить","Отмена"); }
Код
shopgame[0] = CreatePickup(1318,23,1095.0177,-1271.0736,13.5469); shopgame[1] = CreatePickup(1318,23,-2240.7209,137.0842,1035.4141,1); gamebuy = CreatePickup(1559,2,-2236.6345,130.3810,1035.4141,1);
Код
if(dialogid == 1456) { if(response) { if(listitem == 0) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); vehgame[playerid] = CreateVehicle(441, 1094.8605,-1274.5646,13.5469, 0.0, 0, 0, 12000); PutPlayerInVehicle(playerid, vehgame[playerid], 0); PlayerInfo[playerid][pCash] -= 1000; } if(listitem == 1) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); vehgame[playerid] = CreateVehicle(464, 1094.8605,-1274.5646,13.5469, 0.0, 0, 0, 12000); PutPlayerInVehicle(playerid, vehgame[playerid], 0); PlayerInfo[playerid][pCash] -= 2800; } if(listitem == 2) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); vehgame[playerid] = CreateVehicle(465, 1094.8605,-1274.5646,13.5469, 0.0, 0, 0, 12000); PutPlayerInVehicle(playerid, vehgame[playerid], 0); PlayerInfo[playerid][pCash] -= 2500; } if(listitem == 3) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); vehgame[playerid] = CreateVehicle(501, 1094.8605,-1274.5646,13.5469, 0.0, 0, 0, 12000); PutPlayerInVehicle(playerid, vehgame[playerid], 0); PlayerInfo[playerid][pCash] -= 2600; } if(listitem == 4) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); vehgame[playerid] = CreateVehicle(564, 1094.8605,-1274.5646,13.5469, 0.0, 0, 0, 12000); PutPlayerInVehicle(playerid, vehgame[playerid], 0); PlayerInfo[playerid][pCash] -= 6200; } if(listitem == 5) { SetPlayerPos(playerid,1094.8605,-1274.5646,13.5469); SetPlayerFacingAngle(playerid,180); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid, 0); vehgame[playerid] = CreateVehicle(594, 1094.8605,-1274.5646,13.5469, 0.0, 0, 0, 12000); PutPlayerInVehicle(playerid, vehgame[playerid], 0); PlayerInfo[playerid][pCash] -= 800; } } }
Цитата
В OnPlayerKeyStateChange
Код
if(newkeys == 16) { if(!IsPlayerConnected(playerid)) return 1; if(vehgame[playerid]) DestroyVehicle(GetPlayerVehicleID(playerid)); }
[moder]выход из машины на клавишу Enter[/moder]
From Russia With Love!