26.10.2014, 14:35
So i have made some gates and when i go near them and type the cmd they don't open/close.. anyone help?
The code:
The code:
Код:
new adgarage; new vipgarage; new vipgarage3
Код:
COMMAND:adopen(playerid, params[]) { if(IsPlayerInRangeOfPoint(7, playerid, 1620.6000000, -1862.1000000, 15.3000000)) { if(APlayerData[playerid][PlayerLevel] >= 1) { MoveObject(adgarage, 1620.6000000, -1862.1000000, 15.3000000, 2); SendClientMessage(playerid, -1, "Gate Opened"); } } return 1; }
Код:
COMMAND:adclose(playerid, params[]) { if(IsPlayerInRangeOfPoint(7, playerid, 1620.6000000, -1862.1000000, 15.3000000)) { if(APlayerData[playerid][PlayerLevel] >= 1) { MoveObject(adgarage, 1620.6000000, -1862.1000000, 15.3000000, 2); SendClientMessage(playerid, -1, "Gate Closed"); } } return 1; }
Код:
adgarage = CreateObject(980,1620.6000000,-1862.1000000,15.3000000,0.0000000,0.0000000,0.0000000); //gate 2 ata !!!
Код:
COMMAND:vopen(playerid, params[]) { if(IsPlayerInRangeOfPoint(7, playerid, 1644.1000000, -1713.7000000, 16.4000000)) { if(pInfo[playerid][vStatus] >= 1) { MoveObject(vipgarage, 1644.1000000, -1713.7000000, 16.4000000, 2); SendClientMessage(playerid, -1, "Gate Opened"); } } return 1; }
Код:
COMMAND:vclose(playerid, params[]) { if(IsPlayerInRangeOfPoint(7, playerid, 1644.1000000, -1713.7000000, 16.4000000)) { if(pInfo[playerid][vStatus] >= 1) { MoveObject(vipgarage, 1644.1000000, -1713.7000000, 16.4000000, 2); SendClientMessage(playerid, -1, "Gate Closed"); } } return 1; }
Код:
vipgarage3 = CreateObject(980,1284.2000000,-2056.3000000,60.5000000,0.0000000,0.0000000,90.0000000); //gate 1 ata !!!
Код:
vipgarage = CreateObject(980,1644.1000000,-1713.7000000,16.4000000,0.0000000,0.0000000,90.0000000); //gate 3 ata !!!