16.04.2012, 18:49
Pelo jeito й para nгo dar lock para o si mesmo, e sim para os outros players.
Voltando ao assunto do tуpico, tente assim: (Caso nгo funcione, poste a funзгo LockCar)
Voltando ao assunto do tуpico, tente assim: (Caso nгo funcione, poste a funзгo LockCar)
pawn Code:
if(strcmp(cmdtext, "/trancarc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
new carid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /trancarc [carro id]");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && i != playerid)
{
VTrancado[carid] = 1;
LockCar(carid);
}
}
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
SendClientMessage(playerid, 0x33AA33AA, "Veiculo Trancado");
}
return 1;
}