10.10.2011, 00:02
Comando /delveh:
Comanod de Spawncar quando o player esta dentor carro e da Respawn naquele caro.
pawn Код:
if(strcmp(cmd, "/delveh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage(playerid, COLOR_GREY, "Sem Autorizaзгo");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
DestroyVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_GREY, "Veiculo destruido!");
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/spawncar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1 )
{
SendClientMessage(playerid,0x980000AA, "[ERRO] Vocк nгo estб autorizado a usar este comando!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY, "Veiculo Spawnado!");
}
}
return 1;
}