Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp> // Include //
- #include <streamer> // Include //
- //----------------------------------//
- //----------------------------------//
- new tp1; // //
- new tp2; // //
- new tp3; // //
- new tp4; // //
- new tp5; // TELEPORTS //
- new tp6; // //
- new tp7; // //
- new tp8; // //
- new tp9; // //
- new tp10; // //
- //----------------------------------//
- //----------------------------------//
- new Text3D:ltp1; // //
- new Text3D:ltp2; // //
- new Text3D:ltp3; // //
- new Text3D:ltp4; // //
- new Text3D:ltp5; // TELEPORT //
- new Text3D:ltp6; // TEXTS //
- new Text3D:ltp7; // //
- new Text3D:ltp8; // //
- new Text3D:ltp9; // //
- new Text3D:ltp10; // //
- //----------------------------------//
- //----------------------------------//
- new hp; // Health //
- new ar; // Pickups //
- //----------------------------------//
- //----------------------------------//
- new mg; // Weapon //
- new rk; // Pickups //
- //----------------------------------//
- //----------------------------------//
- new Text3D:texthouse; // Gang House //
- new ghouse; // Pickup //
- //----------------------------------//
- //----------------------------------//
- new Text3D:textloot;// Loot //
- new loot; // Pickup //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new heal_timer[MAX_PLAYERS]; // Heal Pickups //
- new armour_timer[MAX_PLAYERS]; // Cooldown //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new minigun_timer[MAX_PLAYERS]; // Weapons Pickups //
- new rocket_timer[MAX_PLAYERS]; // Cooldown //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new base_timer[MAX_PLAYERS]; // Base Protection //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new rp_timer[MAX_PLAYERS]; // Pickups Protection //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new wp_timer[MAX_PLAYERS]; // Weapons Protection //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new tp_timer[MAX_PLAYERS]; // Teleports Protection //
- //------------------------------------------------------//
- //------------------------------------------------------//
- new tlp1_timer[MAX_PLAYERS]; // Save Teleport Protection #1 //
- new tlp2_timer[MAX_PLAYERS]; // Save Teleport Protection #2 //
- new tlp3_timer[MAX_PLAYERS]; // Save Teleport Protection #3 //
- new tlp4_timer[MAX_PLAYERS]; // Save Teleport Protection #4 //
- new tlp5_timer[MAX_PLAYERS]; // Save Teleport Protection #5 //
- new tlp6_timer[MAX_PLAYERS]; // Save Teleport Protection #6 //
- new tlp7_timer[MAX_PLAYERS]; // Save Teleport Protection #7 //
- new tlp8_timer[MAX_PLAYERS]; // Save Teleport Protection #8 //
- new tlp9_timer[MAX_PLAYERS]; // Save Teleport Protection #9 //
- new tlp10_timer[MAX_PLAYERS]; // Save Teleport Protection #10 //
- //--------------------------------------------------------------------//
- //--------------------------------------------------------------------//
- new tele1_timer[MAX_PLAYERS]; // Create Teleport Protection #1 //
- new tele2_timer[MAX_PLAYERS]; // Create Teleport Protection #2 //
- new tele3_timer[MAX_PLAYERS]; // Create Teleport Protection #3 //
- new tele4_timer[MAX_PLAYERS]; // Create Teleport Protection #4 //
- new tele5_timer[MAX_PLAYERS]; // Create Teleport Protection #5 //
- new tele6_timer[MAX_PLAYERS]; // Create Teleport Protection #6 //
- new tele7_timer[MAX_PLAYERS]; // Create Teleport Protection #7 //
- new tele8_timer[MAX_PLAYERS]; // Create Teleport Protection #8 //
- new tele9_timer[MAX_PLAYERS]; // Create Teleport Protection #9 //
- new tele10_timer[MAX_PLAYERS]; // Create Teleport Protection #10 //
- //--------------------------------------------------------------------//
- //--------------------------------------------------------------------//
- new Float:posX[MAX_PLAYERS]; // //
- new Float:posY[MAX_PLAYERS]; // //
- new Float:posZ[MAX_PLAYERS]; // Gang //
- new Float:posA[MAX_PLAYERS]; // Spawn //
- new Saved[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX1[MAX_PLAYERS]; // //
- new Float:posY1[MAX_PLAYERS]; // //
- new Float:posZ1[MAX_PLAYERS]; // Teleport //
- new Float:posA1[MAX_PLAYERS]; // #1 //
- new Saved1[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX2[MAX_PLAYERS]; // //
- new Float:posY2[MAX_PLAYERS]; // //
- new Float:posZ2[MAX_PLAYERS]; // Teleport //
- new Float:posA2[MAX_PLAYERS]; // #2 //
- new Saved2[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX3[MAX_PLAYERS]; // //
- new Float:posY3[MAX_PLAYERS]; // //
- new Float:posZ3[MAX_PLAYERS]; // Teleport //
- new Float:posA3[MAX_PLAYERS]; // #3 //
- new Saved3[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX4[MAX_PLAYERS]; // //
- new Float:posY4[MAX_PLAYERS]; // //
- new Float:posZ4[MAX_PLAYERS]; // Teleport //
- new Float:posA4[MAX_PLAYERS]; // #4 //
- new Saved4[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX5[MAX_PLAYERS]; // //
- new Float:posY5[MAX_PLAYERS]; // //
- new Float:posZ5[MAX_PLAYERS]; // Teleport //
- new Float:posA5[MAX_PLAYERS]; // #5 //
- new Saved5[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX6[MAX_PLAYERS]; // //
- new Float:posY6[MAX_PLAYERS]; // //
- new Float:posZ6[MAX_PLAYERS]; // Teleport //
- new Float:posA6[MAX_PLAYERS]; // #6 //
- new Saved6[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX7[MAX_PLAYERS]; // //
- new Float:posY7[MAX_PLAYERS]; // //
- new Float:posZ7[MAX_PLAYERS]; // Teleport //
- new Float:posA7[MAX_PLAYERS]; // #7 //
- new Saved7[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX8[MAX_PLAYERS]; // //
- new Float:posY8[MAX_PLAYERS]; // //
- new Float:posZ8[MAX_PLAYERS]; // Teleport //
- new Float:posA8[MAX_PLAYERS]; // #8 //
- new Saved8[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX9[MAX_PLAYERS]; // //
- new Float:posY9[MAX_PLAYERS]; // //
- new Float:posZ9[MAX_PLAYERS]; // Teleport //
- new Float:posA9[MAX_PLAYERS]; // #9 //
- new Saved9[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX10[MAX_PLAYERS]; // //
- new Float:posY10[MAX_PLAYERS]; // //
- new Float:posZ10[MAX_PLAYERS]; // Teleport //
- new Float:posA10[MAX_PLAYERS]; // #10 //
- new Saved10[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX11[MAX_PLAYERS]; // //
- new Float:posY11[MAX_PLAYERS]; // //
- new Float:posZ11[MAX_PLAYERS]; // BASE //
- new Float:posA11[MAX_PLAYERS]; // //
- new Saved11[MAX_PLAYERS]; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- public OnFilterScriptExit()
- {
- DestroyDynamicCP(tp1); //--------------------------------//
- DestroyDynamicCP(tp2); // //
- DestroyDynamicCP(tp3); // //
- DestroyDynamicCP(tp4); // //
- DestroyDynamicCP(tp5); // //
- DestroyDynamicCP(tp6); // //
- DestroyDynamicCP(tp7); // //
- DestroyDynamicCP(tp8); // //
- DestroyDynamicCP(tp9); // //
- DestroyDynamicCP(tp10); // //
- Delete3DTextLabel(ltp1); // //
- Delete3DTextLabel(ltp2); // //
- Delete3DTextLabel(ltp3); // //
- Delete3DTextLabel(ltp4); //--------------------------------//
- Delete3DTextLabel(ltp5); // Destroy everythink //
- Delete3DTextLabel(ltp6); // after reload //
- Delete3DTextLabel(ltp7); //--------------------------------//
- Delete3DTextLabel(ltp8); // //
- Delete3DTextLabel(ltp9); // //
- Delete3DTextLabel(ltp10); // //
- Delete3DTextLabel(textloot); // //
- Delete3DTextLabel(texthouse); // //
- DestroyDynamicPickup(hp); // //
- DestroyDynamicPickup(ar); // //
- DestroyDynamicPickup(loot); // //
- DestroyDynamicPickup(ghouse); // //
- DestroyDynamicPickup(mg); // //
- DestroyDynamicPickup(rk); // //
- DestroyDynamicPickup(mg); // //
- DestroyDynamicPickup(rk); //--------------------------------//
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/editgang", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- ShowPlayerDialog(playerid, 25 ,DIALOG_STYLE_LIST,"{FF0000}Create Gang {FFFFFF}panel","{FF0000}Set Spawn\n{FF0000}Set Gang House\n{FF0000}Set Base\n{FF0000}Set Loot\n{FF0000}Set Health\n{FF0000}Set Armour\n{FF0000}Set Minigun\n{FF0000}Set Rocket\n{FF0000}Set Teleport\n{FF0000}Remove Weapons\n{FF0000}Remove Teleports\n{FF0000}Remove Pickups","Select","Close");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gang", cmdtext, true, 10) == 0)
- {
- if(Saved[playerid] == 1)
- {
- SetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]),SetPlayerFacingAngle(playerid, posA[playerid]),SetCameraBehindPlayer(playerid),ResetPlayerWeapons(playerid),GivePlayerWeapon(playerid,9,1),GivePlayerWeapon(playerid,24,6000),GivePlayerWeapon(playerid,26,6000),GivePlayerWeapon(playerid,32,6000),GivePlayerWeapon(playerid,31,6000),GivePlayerWeapon(playerid,34,6000);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Spawn is not saved!");
- }
- return 1;
- }
- if (strcmp("/base", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, 35 ,DIALOG_STYLE_LIST,"Editgang Base","{FFFF00}Gang Tester V2.2","Teleport","Close");
- return 1;
- }
- if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- if(tlp1_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX1[playerid], posY1[playerid], posZ1[playerid]),GetPlayerFacingAngle(playerid, posA1[playerid]);
- Saved1[playerid] = 1;
- tlp1_timer[playerid] = SetTimerEx("tlp1",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp2_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX2[playerid], posY2[playerid], posZ2[playerid]),GetPlayerFacingAngle(playerid, posA2[playerid]);
- Saved2[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp2_timer[playerid] = SetTimerEx("tlp2",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp3_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX3[playerid], posY3[playerid], posZ3[playerid]),GetPlayerFacingAngle(playerid, posA3[playerid]);
- Saved3[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp3_timer[playerid] = SetTimerEx("tlp3",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp4_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX4[playerid], posY4[playerid], posZ4[playerid]),GetPlayerFacingAngle(playerid, posA4[playerid]);
- Saved4[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp4_timer[playerid] = SetTimerEx("tlp4",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp5_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX5[playerid], posY5[playerid], posZ5[playerid]),GetPlayerFacingAngle(playerid, posA5[playerid]);
- Saved5[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp5_timer[playerid] = SetTimerEx("tlp5",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp6_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX6[playerid], posY6[playerid], posZ6[playerid]),GetPlayerFacingAngle(playerid, posA6[playerid]);
- Saved6[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp6_timer[playerid] = SetTimerEx("tlp6",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp7_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX7[playerid], posY7[playerid], posZ7[playerid]),GetPlayerFacingAngle(playerid, posA7[playerid]);
- Saved7[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp7_timer[playerid] = SetTimerEx("tlp7",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 8", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp8_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX8[playerid], posY8[playerid], posZ8[playerid]),GetPlayerFacingAngle(playerid, posA8[playerid]);
- Saved8[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp8_timer[playerid] = SetTimerEx("tlp8",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 9", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp9_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX9[playerid], posY9[playerid], posZ9[playerid]),GetPlayerFacingAngle(playerid, posA9[playerid]);
- Saved9[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp9_timer[playerid] = SetTimerEx("tlp9",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 10", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(tlp10_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX10[playerid], posY10[playerid], posZ10[playerid]),GetPlayerFacingAngle(playerid, posA10[playerid]);
- Saved10[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
- tlp10_timer[playerid] = SetTimerEx("tlp10",3600000,false,"i",playerid);
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/world", cmdtext, true, 10) == 0)
- {
- new string[32];
- format(string, sizeof(string), "Current World: %i", GetPlayerVirtualWorld(playerid));
- SendClientMessage(playerid, 0xCCCCCCCC, string);
- return 1;
- }
- if (strcmp("/angle", cmdtext, true, 10) == 0)
- {
- new Float:Angle, string[26];
- GetPlayerFacingAngle(playerid, Angle);
- format(string, sizeof(string), "Current Facing Angle: %0.2f", Angle);
- SendClientMessage(playerid, 0xCCCCCCCC, string);
- return 1;
- }
- return 0;
- }
- public OnPlayerPickUpDynamicPickup(playerid, pickupid)
- {
- if(pickupid == hp)
- {
- new string[128];
- if(heal_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
- SetPlayerHealth(playerid,100);
- GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3);
- heal_timer[playerid] = SetTimerEx("health",200000,false,"i",playerid);
- }
- if(pickupid == ar)
- {
- new string[128];
- if(armour_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
- SetPlayerArmour(playerid,100);
- GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3);
- armour_timer[playerid] = SetTimerEx("armour",200000,false,"i",playerid);
- }
- if(pickupid == mg)
- {
- new string[128];
- if(minigun_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can load this gun only once every 10 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GivePlayerWeapon(playerid, 38, 50);
- GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
- minigun_timer[playerid] = SetTimerEx("minigun",1000000,false,"i",playerid);
- }
- if(pickupid == rk)
- {
- new string[128];
- if(rocket_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can load this gun only once every 10 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GivePlayerWeapon(playerid, 35, 10);
- SetTimer("message", 100000, 1);
- GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
- rocket_timer[playerid] = SetTimerEx("rocket",1000000,false,"i",playerid);
- }
- if(pickupid == ghouse)
- {
- }
- if(pickupid == loot)
- {
- }
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == tp1)
- {
- if(Saved1[playerid] == 1)
- SetPlayerPos(playerid, posX1[playerid], posY1[playerid], posZ1[playerid]),SetPlayerFacingAngle(playerid, posA1[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp2)
- {
- if(Saved2[playerid] == 1)
- SetPlayerPos(playerid, posX2[playerid], posY2[playerid], posZ2[playerid]),SetPlayerFacingAngle(playerid, posA2[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp3)
- {
- if(Saved3[playerid] == 1)
- SetPlayerPos(playerid, posX3[playerid], posY3[playerid], posZ3[playerid]),SetPlayerFacingAngle(playerid, posA3[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp4)
- {
- if(Saved4[playerid] == 1)
- SetPlayerPos(playerid, posX4[playerid], posY4[playerid], posZ4[playerid]),SetPlayerFacingAngle(playerid, posA4[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp5)
- {
- if(Saved5[playerid] == 1)
- SetPlayerPos(playerid, posX5[playerid], posY5[playerid], posZ5[playerid]),SetPlayerFacingAngle(playerid, posA5[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp6)
- {
- if(Saved6[playerid] == 1)
- SetPlayerPos(playerid, posX6[playerid], posY6[playerid], posZ6[playerid]),SetPlayerFacingAngle(playerid, posA6[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp7)
- {
- if(Saved7[playerid] == 1)
- SetPlayerPos(playerid, posX7[playerid], posY7[playerid], posZ7[playerid]),SetPlayerFacingAngle(playerid, posA7[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp8)
- {
- if(Saved8[playerid] == 1)
- SetPlayerPos(playerid, posX8[playerid], posY8[playerid], posZ8[playerid]),SetPlayerFacingAngle(playerid, posA8[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp9)
- {
- if(Saved9[playerid] == 1)
- SetPlayerPos(playerid, posX9[playerid], posY9[playerid], posZ9[playerid]),SetPlayerFacingAngle(playerid, posA9[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp10)
- {
- if(Saved10[playerid] == 1)
- SetPlayerPos(playerid, posX10[playerid], posY10[playerid], posZ10[playerid]),SetPlayerFacingAngle(playerid, posA10[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 25)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]),GetPlayerFacingAngle(playerid, posA[playerid]);
- Saved[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Spawn was successfully set!");
- }
- if(listitem == 1)
- {
- Delete3DTextLabel(texthouse);
- DestroyDynamicPickup(ghouse);
- new Float:x1, Float:y1, Float:z1;
- GetPlayerPos(playerid, x1, y1, z1);
- ghouse = CreateDynamicPickup(1239, 1, x1, y1, z1, -1);
- texthouse = Create3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x1, y1, z1, 25.0, 0);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang House was successfully set!");
- }
- if(listitem == 2)
- {
- if(base_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Base can by set only once!");
- GetPlayerPos(playerid, posX11[playerid], posY11[playerid], posZ11[playerid]),GetPlayerFacingAngle(playerid, posA11[playerid]);
- Saved11[playerid] = 1;
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Base was successfully set!");
- base_timer[playerid] = SetTimerEx("base",3600000,false,"i",playerid);
- }
- if(listitem == 3)
- {
- Delete3DTextLabel(textloot);
- DestroyDynamicPickup(loot);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
- textloot = Create3DTextLabel("{CC9900}Gang Loot \n{FFFFFF}Money: {FF0000}999999999{FFFFFF}, Coins: {FF0000}123456789{FFFFFF}, Gems: {FF0000}1337\n{FFFFFF}/loot", -1, x, y, z, 25.0, 0);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Loot was successfully set!");
- }
- if(listitem == 4)
- {
- DestroyDynamicPickup(hp);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- hp = CreateDynamicPickup(1240, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Health was successfully set!");
- }
- if(listitem == 5)
- {
- DestroyDynamicPickup(ar);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- ar = CreateDynamicPickup(1242, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Armour was successfully set!");
- }
- if(listitem == 6)
- {
- DestroyDynamicPickup(mg);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- mg = CreateDynamicPickup(362, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Minigun was successfully set!");
- }
- if(listitem == 7)
- {
- DestroyDynamicPickup(rk);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- rk = CreateDynamicPickup(359, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Rocket was successfully set!");
- }
- if(listitem == 8)
- {
- ShowPlayerDialog(playerid, 40 ,DIALOG_STYLE_LIST ,"{FF0000}Set Teleport","{FF0000}#1\n{FF0000}#2\n{FF0000}#3\n{FF0000}#4\n{FF0000}#5\n{FF0000}#6\n{FF0000}#7\n{FF0000}#8\n{FF0000}#9\n{FF0000}#10","Create","Close");
- }
- if(listitem == 9)
- {
- if(wp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Weapons are not created!");
- DestroyDynamicPickup(mg);
- DestroyDynamicPickup(rk);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Weapons are successfully removed!");
- wp_timer[playerid] = SetTimerEx("weapons",3600000,false,"i",playerid);
- }
- if(listitem == 10)
- {
- if(tp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports are not created!");
- DestroyDynamicCP(tp1);
- DestroyDynamicCP(tp2);
- DestroyDynamicCP(tp3);
- DestroyDynamicCP(tp4);
- DestroyDynamicCP(tp5);
- DestroyDynamicCP(tp6);
- DestroyDynamicCP(tp7);
- DestroyDynamicCP(tp8);
- DestroyDynamicCP(tp9);
- DestroyDynamicCP(tp10);
- Delete3DTextLabel(ltp1);
- Delete3DTextLabel(ltp2);
- Delete3DTextLabel(ltp3);
- Delete3DTextLabel(ltp4);
- Delete3DTextLabel(ltp5);
- Delete3DTextLabel(ltp6);
- Delete3DTextLabel(ltp7);
- Delete3DTextLabel(ltp8);
- Delete3DTextLabel(ltp9);
- Delete3DTextLabel(ltp10);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleports are successfully removed!");
- tp_timer[playerid] = SetTimerEx("teleports",3600000,false,"i",playerid);
- }
- if(listitem == 11)
- {
- if(rp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Pickups are not created!");
- Delete3DTextLabel(textloot);
- Delete3DTextLabel(texthouse);
- DestroyDynamicPickup(hp);
- DestroyDynamicPickup(ar);
- DestroyDynamicPickup(loot);
- DestroyDynamicPickup(ghouse);
- SendClientMessage(playerid, 0x00CC3300, "SERVER: Pickups are successfully removed!");
- rp_timer[playerid] = SetTimerEx("pickups",3600000,false,"i",playerid);
- }
- }
- return 1;
- }
- if(dialogid == 35)
- {
- if(response)
- {
- if(Saved11[playerid] == 1)
- {
- SetPlayerPos(playerid, posX11[playerid], posY11[playerid], posZ11[playerid]),SetPlayerFacingAngle(playerid, posA11[playerid]),SetCameraBehindPlayer(playerid),GameTextForPlayer(playerid,"~g~~h~Teleported",2000,3);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Base is not saved!");
- }
- }
- return 1;
- }
- if(dialogid == 10)
- {
- if(response)
- {
- if(tele1_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp1 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp1 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp1, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 1 to save checkpoint direction!");
- tele1_timer[playerid] = SetTimerEx("tp1",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 11)
- {
- if(response)
- {
- if(tele2_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp2 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp2 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp2, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 2 to save checkpoint direction!");
- tele2_timer[playerid] = SetTimerEx("tp2",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 12)
- {
- if(response)
- {
- if(tele3_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp3 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp3 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp3, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 3 to save checkpoint direction!");
- tele3_timer[playerid] = SetTimerEx("tp3",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 13)
- {
- if(response)
- {
- if(tele4_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp4 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp4 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp4, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 4 to save checkpoint direction!");
- tele4_timer[playerid] = SetTimerEx("tp4",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 14)
- {
- if(response)
- {
- if(tele5_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp5 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp5 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp5, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 5 to save checkpoint direction!");
- tele5_timer[playerid] = SetTimerEx("tp5",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 15)
- {
- if(response)
- {
- if(tele6_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp6 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp6 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp6, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 6 to save checkpoint direction!");
- tele6_timer[playerid] = SetTimerEx("tp6",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 16)
- {
- if(response)
- {
- if(tele7_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp7 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp7 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp7, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 7 to save checkpoint direction!");
- tele7_timer[playerid] = SetTimerEx("tp7",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 17)
- {
- if(response)
- {
- if(tele8_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp8 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp8 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp8, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 8 to save checkpoint direction!");
- tele8_timer[playerid] = SetTimerEx("tp8",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 18)
- {
- if(response)
- {
- if(tele9_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp9 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp9 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp9, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 9 to save checkpoint direction!");
- tele9_timer[playerid] = SetTimerEx("tp9",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 19)
- {
- if(response)
- {
- if(tele10_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp10 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
- ltp10 = Create3DTextLabel("", -1, x, y, z, 15, 0);
- Update3DTextLabelText(ltp10, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 10 to save checkpoint direction!");
- tele10_timer[playerid] = SetTimerEx("tp10",3600000,false,"i",playerid);
- }
- return 1;
- }
- if(dialogid == 40)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, 10 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 1)
- {
- ShowPlayerDialog(playerid, 11 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 2)
- {
- ShowPlayerDialog(playerid, 12 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 3)
- {
- ShowPlayerDialog(playerid, 13 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 4)
- {
- ShowPlayerDialog(playerid, 14 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 5)
- {
- ShowPlayerDialog(playerid, 15 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 6)
- {
- ShowPlayerDialog(playerid, 16 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 7)
- {
- ShowPlayerDialog(playerid, 17 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 8)
- {
- ShowPlayerDialog(playerid, 18 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 9)
- {
- ShowPlayerDialog(playerid, 19 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement