17.12.2013, 23:22
tenho um comando de criar carros pela id , mais tem q ter as cordenadas, e demora muita eu pegar pra poder criar 1 veiculo alguem pode edita ele pra mim ?
pawn Код:
COMMAND:veiculo(playerid, params[])
{
// Setup local variables
new VehicleModel, vID, Msg[128], Float:x, Float:y, Float:z, Float:Angle, SpawnDelay;
// Send the command to all admins so they can see it
SendAdminText(playerid, "/veiculo", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 5
if (APlayerData[playerid][PlayerLevel] >= 5)
{
if (sscanf(params, "iffffi", VehicleModel, x, y, z, Angle, SpawnDelay)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/vehicle <VehicleModel> <x> <y> <z> <Angle> <SpawnDelay>\"");
else
{
// Spawn the vehicle at the location specified by the player (also set max-fuel and save the model for the vehicle)
vID = Vehicle_Create(VehicleModel, x, y, z, Angle, random(126), random(126), SpawnDelay);
// Inform the player about it
format(Msg, 128, "Voce Criou o Veiculo %i (model-id = %i) at coords: x=%4.2f, y=%4.2f, z=%4.2f", vID, VehicleModel, x, y, z);
SendClientMessage(playerid, 0x00FF00FF, Msg);
}
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}