20.04.2014, 21:37
alguйm pode me ajuda PF...





pawn Код:
// Respawns the given vehicle
COMMAND:respawn(playerid, params[])
{
// Setup local variables
new vid, Msg[128];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/respawn", 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)
{
if (sscanf(params, "i", vid)) SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/respawn <Vehicle-id>\"");
else
{
// Check if the vehicle-id is valid
if ((vid > 0) && (vid < 2000))
{
// Check if the vehicle exists
if (AVehicleData[vid][Model] != 0)
{
// Force the vehicle to respawn
SetVehicleToRespawn(vid);
// Let the player know he respawned the vehicle
format(Msg, 128, "{808080}Voce respawnou o veiculo {FFFFFF}%i", vid);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{808080}Use Veiculos de 1 a 1999");
}
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}

