25.06.2013, 17:57
Bem eu faзo o comando para apagar um carro do servidor , aparece veiculo removido com sucesso mas nгo apaga, o carro continua lб . . . alguйm pode dar ai uma ajuda?
Comando:
REP ++
Comando:
pawn Код:
if(strcmp(cmd, "/apagarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "*{C8C8C8} Comando:{FFFFFF} /apagarcarro [carid]");
return 1;
}
new vehicleid = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 15)
{
new car = vehicleid - 1;
DynamicCars[car][CarModel] = 0;
DynamicCars[car][CarX] = 0.000000;
DynamicCars[car][CarY] = 0.000000;
DynamicCars[car][CarZ] = 0.000000;
DynamicCars[car][CarAngle] = 0.000000;
DynamicCars[car][CarColor1] = 1;
DynamicCars[car][CarColor2] = 1;
DynamicCars[car][FactionCar] = 255;
DynamicCars[car][CarType] = 255;
DynamicCars[car][buy] = 0;
DynamicCars[car][comprado] = 0;
DynamicCars[car][valor] = 0;
DynamicCars[car][Drugs] = 0;
DynamicCars[car][Locked] = 0;
DynamicCars[car][cComponent0] = 0;
DynamicCars[car][cComponent1] = 0;
DynamicCars[car][cComponent2] = 0;
DynamicCars[car][cComponent3] = 0;
DynamicCars[car][cComponent4] = 0;
DynamicCars[car][cComponent5] = 0;
DynamicCars[car][cComponent6] = 0;
DynamicCars[car][cComponent7] = 0;
DynamicCars[car][cComponent8] = 0;
DynamicCars[car][cComponent9] = 0;
DynamicCars[car][cComponent10] = 0;
DynamicCars[car][cComponent11] = 0;
DynamicCars[car][cComponent12] = 0;
DynamicCars[car][cComponent13] = 0;
DynamicCars[car][cPaintjob] = 999;
DynamicCars[car][cneon] = 255;
DynamicCars[car][CarHP] = 1000.000000;
SaveDynamicCars();
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Carro Removido Com Sucesso.");
}
else
{
SendClientMessage(playerid,COLOR_RED,SEM_NIVEL);
}
}
return 1;
}
REP ++