[PEDIDO] Sistema de Aprennder Carro -
wallacematheus - 20.09.2011
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
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;
}
Re: [PEDIDO] Sistema de Aprennder Carro -
wallacematheus - 20.09.2011
alguem
Re: [PEDIDO] Sistema de Aprennder Carro -
Hardware - 20.09.2011
Nгo entendi seu problema, tem como explicar melhor?
Re: [PEDIDO] Sistema de Aprennder Carro -
wallacematheus - 20.09.2011
Tipo os carros so sao apreendidos se estiverem no gm
queria que prendesse os carros foram do gm como os do estacionamento que fica no arquivo carros.cfg
Re: [PEDIDO] Sistema de Aprennder Carro -
wallacematheus - 20.09.2011
soluзгo desses erros....
pawn Код:
D:\SAMP\Wallace.pwn(41569) : error 017: undefined symbol "vPRFLock"
D:\SAMP\Wallace.pwn(41591) : error 029: invalid expression, assumed zero
D:\SAMP\Wallace.pwn(41602) : error 017: undefined symbol "vPRFLock"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
linhas
pawn Код:
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; // linha 41569
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
{ // segundo erro linha 41591
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; // ultima linha 41602
SendClientMessage(playerid, COLOR_WHITE, "[Info] Veнculo liberado.");
}
}
return 1;
}
Re: [PEDIDO] Sistema de Aprennder Carro -
GustavoBR - 21.09.2011
O Primeiro erro, o compilador deve estar se perguntando, "O que seria VRPFLock?" Nгo estб definido...
O Terceiro erro, й a mesma coisa do primeiro =D
Segundo erro,
Faltou o ) no final da linha..
if(PlayerInfo[playerid][pMembro] != 1 || PlayerInfo[playerid][pLider] != 1)