13.08.2012, 16:06
pawn Код:
THIS IS THE CAR COMMAND
// Lets the player choose a car to spawn (in a split list which shows only 10 cars at a time)
COMMAND:car(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/car", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
// Make sure the player isn't inside a vehicle
if (GetPlayerVehicleID(playerid) == 0)
CarList_Create(playerid); // Create a list of cars (only the first 10 cars) and show the dialog so the player can choose a car
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
THIS IS THE PLANE COMMAND
// Lets the player choose a plane to spawn (in a split list which shows only 10 planes at a time)
COMMAND:plane(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/plane", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
// Make sure the player isn't inside a vehicle
if (GetPlayerVehicleID(playerid) == 0)
PlaneList_Create(playerid); // Create a list of planes (only the first 10 planes) and show the dialog so the player can choose a plane
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
This is the trailer command (not working too)
// Lets the player choose a trailer to spawn (in a split list which shows only 10 trailers at a time)
COMMAND:trailer(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/trailer", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
// Make sure the player isn't inside a vehicle
if (GetPlayerVehicleID(playerid) == 0)
TrailerList_Create(playerid); // Create a list of trailers (only the first 10 trailers) and show the dialog so the player can choose a trailer
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}