Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Derby Arena
- CreateDynamicObject(8558, 1088.24097, 1081.46667, 339.29288, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1127.41797, 1081.43835, 339.25760, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1144.50537, 1101.02014, 339.27115, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1123.87512, 1093.33521, 339.27094, 0.00000, 0.00000, 0.83996, 1337);
- CreateDynamicObject(8558, 1122.17712, 1118.27917, 339.24976, 0.00000, 0.00000, 0.83996, 1337);
- CreateDynamicObject(8558, 1103.79468, 1100.41699, 339.31155, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1081.72717, 1105.68225, 339.53198, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1081.81274, 1118.00256, 339.31412, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1084.95776, 1134.12683, 339.31409, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1103.33728, 1116.25964, 339.29346, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1125.01794, 1134.18347, 339.36560, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1165.14978, 1134.21069, 339.24799, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1183.56335, 1116.51685, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1162.79163, 1075.30969, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1161.61072, 1111.98914, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1166.61218, 1081.49902, 339.27261, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1183.86804, 1099.70764, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1164.14343, 1037.83032, 339.25070, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1185.21863, 1061.04736, 339.33081, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1069.74573, 1099.44128, 339.32373, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1065.39746, 1118.37439, 339.32373, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1088.04810, 1087.46045, 339.53201, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1165.33704, 1044.06958, 339.31140, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1125.08081, 1043.95593, 339.31140, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1136.15417, 1061.79358, 339.32367, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1105.24731, 1061.67200, 339.38052, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1147.09753, 1019.48438, 339.27191, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1108.25012, 1019.61945, 339.27191, 0.00000, 0.00000, 0.00000, 1337);
- CreateDynamicObject(8558, 1089.25854, 1047.51929, 339.53201, 0.00000, 0.00000, 91.79996, 1337);
- CreateDynamicObject(8558, 1089.60645, 1037.24792, 339.53201, 0.00000, 0.00000, 91.79996, 1337);
- //Derby Arena
- DerbyEvent[0] = CreateVehicle(502, 1105.6954, 1044.9454, 341.7180+5, 0.0000, -1, -1, 100);
- DerbyEvent[1] = CreateVehicle(502, 1090.0642, 1020.8392, 341.7180+5, 0.0000, -1, -1, 100);
- DerbyEvent[2] = CreateVehicle(502, 1135.8325, 1081.7300, 341.5983+5, 92.5200, -1, -1, 100);
- DerbyEvent[3] = CreateVehicle(502, 1072.9547, 1080.8552, 341.8510+5, 275.4600, -1, -1, 100);
- DerbyEvent[4] = CreateVehicle(502, 1087.6243, 1103.4141, 341.8510+5, 176.1600, -1, -1, 100);
- for(new i =0; i < 5; i++) SetVehicleVirtualWorld(DerbyEvent[4], 1337);
- //DerbyEvent
- new
- DerbyEvent[5],
- DerbyPlayers,
- DerbyStatus,
- DerbyTime,
- InDerby[MAX_PLAYERS],
- DerbyVehicle;
- // Ongamemodeinit
- DerbyTime = 30;
- // Commands
- CMD:derby(playerid, params[]) {
- if(DerbyStatus == 1)
- return SCM(playeri, -1, "Derby Inceput!");
- TogglePlayerControllable(playerid, 0);
- SetPlayerVirtualWorld(playerid, 1337);
- SetVehicleVirtualWorld(DerbyEvent[DerbyPlayers], 1337);
- PutPlayerInVehicle(playerid, DerbyEvent[DerbyPlayers], 0);
- DerbyVehicle[playerid] = DerbyEvent[DerbyPlayers];
- DerbyPlayers++;
- InDerby[playerid] = 1;
- new string[128];
- format(string, sizeof(string), "%s a intrat in arena derby!", GetName(playerid));
- SendDerby(COLOR_YELLOW, string);
- return 1;
- }
- SendDerby(color, text[]) {
- foreach(Playerd, i){
- if(InDerby[i] == 1) {
- SCM(i, color, text);
- }
- }
- return 1;
- }
- function leave_derby(playerid) {
- SetVehicleVirtualWorld(DerbyVehicle[playerid], 1337);
- SetVehicleToRespawn(DerbyVehicle[playerid]);
- SetPlayerVirtualWorld(playerid, 0);
- SpawnPlayer(playerid);
- InDerby[playereid] = 0;
- DerbyPlayers --;
- DerbyVehicle[playerid] = 0;
- SCM(playerid, -1, "debug");
- return 1;
- }
- if(DerbyStatus == 0) {
- if(DerbyTime > 0) {
- DerbyTime--;
- if(DerbyTime == 0){
- if(DerbyPlayers < 1) { // < 2
- foreach(Player, i) {
- if(Derby[i] == 1) leave_derby(i), SCM(i, COLOR_YELLOW "Prea putini playeri!");
- }
- DerbyStatus = 0;
- DerbyTime = 30;
- }
- else {
- DerbyStatus = 1;
- DerbyTime = 60;
- SendDerby(COLOR_YELLOW, "Runda a inceput !");
- foreach(Player, i) {
- if(InDerby[i] == 1) TogglePlayerControllable(i, 1);
- }
- }
- }
- }
- }
- if(DerbyStatus == 1) {
- if(DerbyTime > 0) {
- DerbyTime--;
- if(DerbyTime == 0) {
- foreach(Player, i) {
- if(InDerby[i] ==1) leave_derby(i);
- }
- DerbyStatus = 0;
- DerbyTime = 30;
- SendDerby(COLOR_YELLOW, "Nimeni nu a castigat!");
- }
- else {
- if(DerbyPlayers == 0) { // == 1
- foreach(Player, i) {
- if(Derby[i] == 1) leave_derby(i), SCM(i, COLOR_YELLOW "Felicitari! Ai castigat!");
- }
- DerbyStatus = 0;
- DerbyTime = 30;
- }
- }
- }
- }
- if(InDerby[i] == 1) {
- if(DerbyStatus == 1) {
- new Float: Pos[3];
- GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
- if(Pos[2] < 329.9276) leave_derby(i);
- }
- }
- // OnPlayereDisconnect si la OnlayerSpawn
- if(InDerby[playerid] == 1) leave_derby(playerid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement