SA-MP Forums Archive
[Ajuda] Respawncar Veiculos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Respawncar Veiculos (/showthread.php?tid=359049)



Respawncar Veiculos - alexandreez - 12.07.2012

Eu queria ponhar este comando sуmente para Admins Rcon ,mas nao estou conseguindo. Me ajudem!
pawn Код:
if(strcmp(cmd, "/rv", true) == 0)
{
ResetarVeiculos();
return true;
}

stock ResetarVeiculos()
{
new string[128]="Os Veiculos Sem uso foram Respawnados!!";
SendClientMessageToAll(Verde, string);
new inVeh;
for( new i = 0; i < MAX_VEHICLES; i++ )
{
inVeh = false;
for( new j = 0; j < MAX_PLAYERS; j++ )
{
if(IsPlayerInVehicle( j, i ))
{
inVeh = true;
break;
}
}
if(!inVeh)
{
SetVehicleToRespawn(i);
}
}
}
Ou se possivel colocar esse comandos sуmente para Admins!
Os leveis de adm do meu gm sao: 1,2,3,4,5



Re: Respawncar Veiculos - darkxdll - 12.07.2012

pawn Код:
if(strcmp(cmd, "/rv", true) == 0)
{
if(IsPlayerAdmin(playerid)
{
ResetarVeiculos();
}
return true;
}

stock ResetarVeiculos()
{
new string[128]="Os Veiculos Sem uso foram Respawnados!!";
SendClientMessageToAll(Verde, string);
new inVeh;
for( new i = 0; i < MAX_VEHICLES; i++ )
{
inVeh = false;
for( new j = 0; j < MAX_PLAYERS; j++ )
{
if(IsPlayerInVehicle( j, i ))
{
inVeh = true;
break;
}
}
if(!inVeh)
{
SetVehicleToRespawn(i);
}
}
}
Ta ai mano , quando vocк logar na Rcon vc poderar dar /rv..


AW: Respawncar Veiculos - denis15711 - 13.07.2012

pawn Код:
if(strcmp(cmd, "/rv", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
ResetarVeiculos();
return true;
}

stock ResetarVeiculos()
{
new string[128]="Os Veiculos Sem uso foram Respawnados!!";
SendClientMessageToAll(Verde, string);
new inVeh;
for( new i = 0; i < MAX_VEHICLES; i++ )
{
inVeh = false;
for( new j = 0; j < MAX_PLAYERS; j++ )
{
if(IsPlayerInVehicle( j, i ))
{
inVeh = true;
break;
}
}
if(!inVeh)
{
SetVehicleToRespawn(i);
}
else
{
SendClientMessage(playerid, -1, "ERRO: Vocк nao tem permisгo para usar este comando");
}
}
}
//Tenta ae se der erro chama



Re: Respawncar Veiculos - Victor' - 13.07.2012

Coloque isso abaixo de if(strcmp(cmd, "/rv", true) == 0)
pawn Код:
// Verifica se o jogador nгo й admin logado na RCON e se ele nгo estiver logado envia uma mensagem.
if(IsPlayerAdmin(playerid) == false) return SendClientMessage(playerid, 0xFF0000FF, "[RCON] Apenas quem ta logado em mim pode usa :D");