07.11.2011, 05:47
Alguйm poderia dizer pq este comando nгo funciona? Simplismente nгo acontece nada, nenhuma msg, nada!
pawn Код:
if(strcmp(cmd, "/apreender", true) == 0)
{
if(PlayerInfo[playerid][pTanabolisante] > 0) return SendClientMessage(playerid,COLOR_GREY,"[AV] Vocк estб suspenso!");
if(IsACop(playerid))
{
if(PlayerInfo[playerid][pMember] != 1 || PlayerInfo[playerid][pLeader] != 1) return 0x01;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_GRAD2, "[AV] /apreender [Preзo 0 - 100,000$]");
return 1;
}
new preco;
preco = strval(tmp);
if(preco < 1 || preco > 20000) return SendClientMessage(playerid, COLOR_GREY, " Ultilize de 1 a 20,000$!");
new Float:x,Float:y,Float:z;
new Float:a;
new carid;
carid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GRAD2, "[AV] Vocк nгo estб em um veнculo.");
if(PlayerInfo[playerid][pAdmin] < 500000)
{
if(IsAnOwnableCar(carid))
{
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
CarInfo[carid][cInterior] = GetPlayerInterior(playerid);
CarInfo[carid][cVirWorld] = GetPlayerVirtualWorld(playerid);
CarInfo[carid][cImpounder] = 1;
CarInfo[carid][cImpounderP] = preco;
format(string, sizeof(string), "[AV] HQ: %s %s apreendeu o veнculo de %s[Impounder: %d] no estacionamento. **", GetPlayerCargo(playerid), GetPlayerNameEx(playerid), CarInfo[carid][cOwner], CarInfo[carid][cImpounderP]);
SendFamilyMessage(1, 0x8D8DFFAA, string);
OnPropUpdate(4,carid);
DestroyVehicle(carid);
ownedcar[carid] = AddStaticVehicleEx(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
SetVehicleNumberPlate(carid, CarInfo[carid][cCode]);
if(CarInfo[carid][cPaintjob] != 999)
{
ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]);
}
LinkVehicleToInterior(carid, CarInfo[carid][cInterior]);
SetVehicleVirtualWorld(carid, CarInfo[carid][cVirWorld]);
SetVehicleModifications(carid);
PutPlayerInVehicle(playerid, carid, 0);
new year, month,day;
getdate(year, month, day);
new hour, minute;
gettime(hour,minute);
format(string, sizeof(string), "%s apreendeu o carro ID ( %d/%d/%d - %d:%d )\r\n", GetPlayerNameEx(playerid),carid,year, month, day,hour, minute);
ApreenderLog(string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nгo estб autorizado a usar este comando !");
return 1;
}
}
return 1;
}
}