04.12.2017, 20:37
I use something like that for entering/exiting the bank on my server.
Might be useful to you.
Might be useful to you.
Код:
new Bank1; new Bank2; new Bank3; new Bank4; new Bank5; new Bank6; new Bank7; new Bank8; new BankExit; Bank1=CreateDynamicPickup(1274,1,1461.8743,-1011.6029,26.8438,-1); Bank2=CreateDynamicPickup(1274,1,2474.4038,1023.0991,10.8203,-1); Bank3=CreateDynamicPickup(1274,1,-2764.9155,375.3531,6.3429,-1); Bank4=CreateDynamicPickup(1274,1,-178.1093,1109.9939,19.7422); Bank5=CreateDynamicPickup(1274,1,2862.0969,-1405.7080,11.7344); Bank6=CreateDynamicPickup(1274,1,-1704.3229,785.7140,25.4682); Bank7=CreateDynamicPickup(1274,1,274.1207,-1614.0920,33.2041); Bank8=CreateDynamicPickup(1274,1,2462.8232,2244.1150,10.8203); BankExit=CreateDynamicPickup(1274,1,1563.2772,-2251.8469,266.2109,-1); //OnPlayerPickUpDynamicPickup if(pickupid==Bank1) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=1; } if(pickupid==Bank2) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=2; } if(pickupid==Bank3) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=3; } if(pickupid==Bank4) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=4; } if(pickupid==Bank5) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=5; } if(pickupid==Bank6) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=6; } if(pickupid==Bank7) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=7; } if(pickupid==Bank8) { SetPlayerPos(playerid,1563.3580,-2254.1040,266.2183); FreezeThenAutoUnfreeze(playerid, 3000); GameTextForPlayer(playerid,"~y~b~w~ank",800,1); SetPlayerInterior(playerid,5); bp[playerid]=8; } if(pickupid==BankExit) { SetPlayerInterior(playerid,0); SendClientMessage(playerid,-1,"Have a nice day"); if(bp[playerid]==0)return SetPlayerPos(playerid,1465.7212,-1012.1486,26.8); if(bp[playerid]==1)return SetPlayerPos(playerid,1465.7212,-1012.1486,26.8); if(bp[playerid]==2)return SetPlayerPos(playerid,2474.3806,1020.6902,10.820); if(bp[playerid]==3)return SetPlayerPos(playerid,-2761.7832,375.2657,5.3636); if(bp[playerid]==4)return SetPlayerPos(playerid,-178.1093+2,1109.9939,19.7); if(bp[playerid]==5)return SetPlayerPos(playerid,2865.6575,-1405.8911,10.97); if(bp[playerid]==6)return SetPlayerPos(playerid,-1706.5990,785.5201,24.890); if(bp[playerid]==7)return SetPlayerPos(playerid,272.2456,-1615.6379,33.253); if(bp[playerid]==8)return SetPlayerPos(playerid,2463.0823,2242.0701,10.820); }