Help /rescue
#1

How Can I Add More Places To This Particular Dialog?
Reply
#2

What dialog? ,Explain more and show us the code.
Reply
#3

I dont no the code but its like if you join a trucking server and you type /rescue a dialog pops up
Reply
#4

i think he means dis.

Go to your PPC_PlayerCommands.inc
Line:1231
Код:
// Lets the player choose where he wants to respawn (costs $200)
COMMAND:rescue(playerid, params[])
{
	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/rescue", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player has a wanted level of less than 3
		if (GetPlayerWantedLevel(playerid) < 3)
		{
			// Check if the player isn't in jail
			if (APlayerData[playerid][PlayerJailed] == 0)
			{
				if (APlayerData[playerid][JobStarted] == false)
				{
					// Make sure you can't use "/rescue" when you're inside a vehicle (doesn't respawn you at the requested coords
					// and puts a random item (bottle, sigarette, ...) in the player's hands
					if (GetPlayerVehicleID(playerid) == 0)
					{
					    // Create a dialog based on the player's class
						switch (APlayerData[playerid][PlayerClass])
						{
							case ClassTruckDriver: // Ask where the trucker player wants to respawn
								ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose trucker spawn point:", "Fallen Tree Depot\r\nFlint Trucking Depot\r\nLVA Freight Depot\r\nDoherty Depot\r\nEl Corona Depot\r\nLas Payasdas Depot\r\nQuarry Top\r\nShady Creek Depot", "Spawn", "Cancel");
							case ClassBusDriver: // Ask where the busdriver wants to respawn
								ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose busdriver spawn point:", "Los Santos\r\nSan Fierro\r\nLas Venturas", "Spawn", "Cancel");
							case ClassPilot: // Ask where the pilot wants to respawn
								ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose pilot spawn point:", "Los Santos\r\nSan Fierro\r\nLas Venturas", "Spawn", "Cancel");
							case ClassPolice: // Ask where the police player wants to respawn
								ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose police spawn point:", "Los Santos\r\nSan Fierro\r\nLas Venturas\r\nBeta", "Spawn", "Cancel");
							case ClassCourier: // Ask where the courier player wants to respawn
								ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose courier spawn point:", "Los Santos\r\nSan Fierro\r\nLas Venturas", "Spawn", "Cancel");
						}
					}
					else
						SendClientMessage(playerid, 0xFF0000FF, "You cannot use '/rescue' when you're inside a vehicle"); // "/rescue" doesn't work inside a vehicle
				}
				else
				    SendClientMessage(playerid, 0xFF0000AA, "You cannot use rescue when doing a job"); // "/rescue" doesn't work during a job
			}
			else
			    SendClientMessage(playerid, 0xFF0000AA, "You cannot use /rescue when you're in jail");
		}
		else
		    SendClientMessage(playerid,0xFF0000AA, "{FF0000}You cannot use /rescue when you're wanted");
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}
Go to your PPC_Defines.inc
line:693
// Setup spawnlocations for each class (when selecting "Spawn" at class-selection, a random spawnlocation is selected)
Код:
new ASpawnLocationsTrucker[][TSpawnLocation] =
{
    {-525.0, -502.0, 26.0, 0.0}, // Fallen Tree Depot
    {-74.7, -1137.5, 4.5, 0.0}, // Flint Trucking Depot
    {1457.0, 975.5, 11.0, 0.0}, // LVA Freight Depot
    {-2136.0, -247.5, 36.5, 270.0}, // Doherty Depot
    {1766.5, -2040.7, 14.0, 270.0}, // El Corona Depot
    {-546.0, 2594.0, 54.0, 270.0}, // Las Payasdas Depot
    {332.0, 900.0, 25.0, 205.0}, // Quarry Top
    {-1575.0, -2724.0, 49.0, 146.0}, // Shady Creek Depot
};
Reply
#5

Where Can I Find These Codes In The Files?
Reply
#6

So Can You Show Me What Are The First Things To Do To Add Another Rescue Place
Reply
#7

1:PPC_Defines.inc
2:PPC_PlayerCommands.inc
And More:
Take a look.
Add the \r\nTesting (for the name)
Код:
ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose trucker spawn point:", "Fallen Tree Depot\r\nFlint Trucking Depot\r\nLVA Freight Depot\r\nDoherty Depot\r\nEl Corona Depot\r\nLas Payasdas Depot\r\nQuarry Top\r\nShady Creek Depot", "Spawn", "Cancel");
Like dis.
Код:
ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Choose trucker spawn point:", "Fallen Tree Depot\r\nFlint Trucking Depot\r\nLVA Freight Depot\r\nDoherty Depot\r\nEl Corona Depot\r\nLas Payasdas Depot\r\nQuarry Top\r\nShady Creek Depot\r\nTesting", "Spawn", "Cancel");
+ Add Locations
From PPC_Defines.inc
Код:
new ASpawnLocationsTrucker[][TSpawnLocation] =
{
    {-525.0, -502.0, 26.0, 0.0}, // Fallen Tree Depot
    {-74.7, -1137.5, 4.5, 0.0}, // Flint Trucking Depot
    {1457.0, 975.5, 11.0, 0.0}, // LVA Freight Depot
    {-2136.0, -247.5, 36.5, 270.0}, // Doherty Depot
    {1766.5, -2040.7, 14.0, 270.0}, // El Corona Depot
    {-546.0, 2594.0, 54.0, 270.0}, // Las Payasdas Depot
    {332.0, 900.0, 25.0, 205.0}, // Quarry Top
    {-1575.0, -2724.0, 49.0, 146.0}, // Shady Creek Depot
    {Put your Spawn Here.} //Testing
};
Reply
#8

OK thx
Reply
#9

I Will Try Now
Reply
#10

OK I done that what else to do
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)