[Ajuda] Ajuda com Comando - 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] Ajuda com Comando (
/showthread.php?tid=622158)
Ajuda com Comando -
VinnyScript - 19.11.2016
Depois que destru-o os carros e quero botar os os carros da gm, nao cumpri a funзao oq posso fazer
Respawn dos carros
PHP код:
CMD:rc(playerid)
{
if(Logado[playerid] == false) return SendClientMessage(playerid, Cinza, "[ERRO] Vocк deve logar primeiro.");
if(CBDAdmin[playerid] < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cinza, "[CBD-INFO] Somente Administrador Level 1 ou superior.");
new bool:vehicle[MAX_VEHICLES], rStr[140];
format(rStr, sizeof rStr, "[Administrador] O %s resetou todos os veнculos.", rNome(playerid));
SendClientMessageToAll(Verde, rStr);
for(new j = 1; GetVehicleModel(j); ++j)
{
vehicle[j] = false;
for(new i, p = GetMaxPlayers(); i < p; ++i)
{
if(!IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
if(IsPlayerInVehicle(i, j))
{
vehicle[j] = true;
break;
}
}
if(!vehicle[j]) SetVehicleToRespawn(j);
}
return 1;
}
Destruir Carros
PHP код:
CMD:destruircarros(playerid)
{
if(Logado[playerid] == false) return SendClientMessage(playerid, Cinza, "[ERRO] Vocк deve logar primeiro.");
if(CBDAdmin[playerid] < 1 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cinza, "[CBD-INFO] Somente Administrador Level 1 ou superior.");
new bool:vehicle[MAX_VEHICLES], rStr[140];
format(rStr, sizeof rStr, "[Administrador] O %s Destruiu todos os veнculos.", rNome(playerid));
SendClientMessageToAll(Verde, rStr);
for(new j = 1; GetVehicleModel(j); ++j)
{
vehicle[j] = false;
for(new i, p = GetMaxPlayers(); i < p; ++i)
{
if(!IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
if(IsPlayerInVehicle(i, j))
{
vehicle[j] = true;
break;
}
}
if(!vehicle[j]) DestroyVehicle(j);
}
return 1;
}
Re: Ajuda com Comando -
henriqueTL - 19.11.2016
PHP код:
CMD:dcm(playerid, params[])
{
#pragma unused params
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 3 || Player[playerid][pVip] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pFrente] >= 1 || Player[playerid][pBOPE] >= 1 || Player[playerid][pPMRJ] >= 1 || Player[playerid][pCORE] >= 5)
{
if(Player[playerid][VehicleCreatedFree] >= 1)
{
RemoveNeon(playerid);
DestroyVehicle(Player[playerid][VehicleCreatedFree]);
Player[playerid][VehicleCreatedFree] = 0;
SendClientMessage(playerid, COR_PRINCIPAL, "{9090ee}## Veiculo deleta com sucesso.");
}
else SendClientMessage(playerid, COR_ERRO, "[ERRO] Vocк nгo tem um veнculo criado !");
}
else SendClientMessage(playerid, COR_ERRO, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
return 1;
}
CMD:rc(playerid, params[])
{
#pragma unused params
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
{
if(Player[playerid][pAdmin] >= 1 || Player[playerid][pDJ] >= 2 || Player[playerid][pVip] >= 1 || Player[playerid][pGerente] >= 1 || Player[playerid][pFrente] >= 1 || Player[playerid][pCORE] >= 3 || Player[playerid][pPMRJ] >= 3 || Player[playerid][pBOPE] >= 3 || Player[playerid][pReporterLS] >= 2)
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
RemoveNeon(playerid);
SetVehicleToRespawn(vehicleid);
new string[128];
format(string, 128, "{9090ee}## %s respawnou um veiculo.", getPName(playerid));
MensagemLocal(playerid, COR_ROXO, string, 50);
}
else SendClientMessage(playerid, COR_ERRO, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
}
else SendClientMessage(playerid, COR_ERRO, "[ERRO] Vocк nгo estб em um veнculo ou nгo estб dirigindo ele.");
return 1;
}