20.09.2011, 15:23
Gostaria de um sistema de apreender veiculo mais que funcione quanto como com carros do gm quanto em carros que estгo no arquivo carros.cfg alguem poderia me ajudar..?
da pra usar este aki so q so prende carros do gm queria os outros tbm
da pra usar este aki so q so prende carros do gm queria os outros tbm
PHP код:
if(strcmp(cmd, "/apreendercarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /apreendercarro [carid]");
return 1;
}
if(PlayerInfo[playerid][pMembro] != 1 || PlayerInfo[playerid][pLider] != 1)
{
SendClientMessage(playerid, COLOR_RED, "[Erro] Vocк nгo estб autorizado a usar este comando.");
return 1;
}
else
{
new carid = strval(tmp);
CarInfo[carid][vPRFLock] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetVehicleParamsForPlayer(carid, i, 0, 1);
}
SendClientMessage(playerid, COLOR_WHITE, "[Info] Veнculo apreendido.");
}
}
return 1;
}
if(strcmp(cmd, "/liberarcarro", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /liberarcarro [carid]");
return 1;
}
if(PlayerInfo[playerid][pMembro] != 1 || PlayerInfo[playerid][pLider] != 1
{
SendClientMessage(playerid, COLOR_RED, "[Erro] Vocк nгo estб autorizado a usar este comando.");
return 1;
}
else
{
new carid = strval(tmp);
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetVehicleParamsForPlayer(carid, i, 0, 0);
}
CarInfo[carid][vPRFLock] = 0;
SendClientMessage(playerid, COLOR_WHITE, "[Info] Veнculo liberado.");
}
}
return 1;
}