[Ajuda] Comando de criar veiculo ajuda pffffffff
#1

Ola glr eu sou novo na programaзгo e queria ajuda ai dos pros mas n de mгo beijada e sim me ajudando nesse pequeno erro jб tentei resolver Sozinho e sу consegui resolver 1 agora os outros 5 nгo me ajudem :_
Код:
// Comando  criar e deletar veiculos //

CMD:cvadm(playerid, params[])
{
   new idveiculo, cor[2], Float:[Pos][4];
   if( sscanf( params, "ddd", idveiculo, cor[0], cor[1])) return SendClientMessage(playerid, -1, "{FF0000}| ERRO | Use: /cvadm [ID DO VEICULO] [COR1][COR2]");
   GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
   GetPlayerFacingAngle(playerid, Pos[3]);
   PlayerInfo[playerid][pVeiculo][idveiculo] = CreateVehicle(idveiculo, Pos[0], Pos[1], Pos[2], Pos[3], cor[0], cor[1], 9999);
   SendClientMessage(playerid, -1, "{FFEB00}| INFO | Veiculo Criado com Sucesso!.");
   return 1;

}

CMD:dvadm(playerid)
{

  for(new idveiculo = 0; idveiculo < MAX_VEHICLES; idveiculo++) DestroyVehicle(PlayerInfo[playerid][pVeiculo]);
  SendClientMessage(playerid, -1, "[ CLS ] Todos os veiculos que vocк criou foram removidos.");
  return 1;

}
Код:
enum pInfo{
   pVeiculo[MAX_VEHICLES]

};
esses sгo os cуdigos e agora os erros

C:\Projeto (CLS)\gamemodes\CLS.pwn(17) : warning 201: redefinition of constant/macro (symbol "DialogBoxEx")
C:\Projeto (CLS)\gamemodes\CLS.pwn(227) : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(241) : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(249) : warning 204: symbol is assigned a value that is never used: "Mensagem"
C:\Projeto (CLS)\gamemodes\CLS.pwn(266) : error 001: expected token: "-identifier-", but found "["
C:\Projeto (CLS)\gamemodes\CLS.pwn(26 : error 017: undefined symbol "Pos"
C:\Projeto (CLS)\gamemodes\CLS.pwn(26 : warning 215: expression has no effect
C:\Projeto (CLS)\gamemodes\CLS.pwn(26 : error 001: expected token: ";", but found "]"
C:\Projeto (CLS)\gamemodes\CLS.pwn(26 : error 029: invalid expression, assumed zero
C:\Projeto (CLS)\gamemodes\CLS.pwn(26 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.


era pro comando funcionar assim tipo o adm Teste1 digitou o comando ai criou 1 veнculo ai ele digitou dnv ai criou outro veнculo ai fica 2 veнculos ou seja ele pode criar quantos quiser ai dps ele digita /dvadm para deletar os veнculos admins o /dvadm ta funcionando mas o outro nгo ajudem !!!!!!!!!
Reply
#2

PHP код:
new carrao[MAX_PLAYERS];
CMD:cvadm(playeridparams[])
{
   new 
idveiculocor1cor2FloatPos[4];
   if( 
sscanfparams"ddd"idveiculocor1cor2)) return SendClientMessage(playerid, -1"{FF0000}| ERRO | Use: /cvadm [ID DO VEICULO] [COR1][COR2]");
   
DestroyVehicle(carrao[playerid]);
   
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
   
GetPlayerFacingAngle(playeridPos[3]);
   
carrao[playerid] = CreateVehicle(idveiculoPos[0], Pos[1], Pos[2], Pos[3], cor1cor29999);
   
SendClientMessage(playerid, -1"{FFEB00}| INFO | Veiculo Criado com Sucesso!.");
   return 
1;

PHP код:
CMD:dvadm(playerid)
{
  for(new 
idveiculo 0idveiculo MAX_VEHICLESidveiculo++){
  
DestroyVehicle(idveiculo);}
  
SendClientMessage(playerid, -1"[ CLS ] Todos os veiculos que vocк criou foram removidos.");
  return 
1;

Resultado:

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#3

Esta funcionando porem sу cria infernos os outros ids n funciona e o comando de apagar n apaga
Reply
#4

mano arrumei agora ta apagando mas sу cria infernos os outros ids fala que criou mas n aparece nada olhas os prints

http://imgur.com/a/M5fpw
http://imgur.com/a/B1SeJ

C:\Projeto (CLS)\gamemodes\CLS.pwn(17) : warning 201: redefinition of constant/macro (symbol "DialogBoxEx")
C:\Projeto (CLS)\gamemodes\CLS.pwn(22 : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(242) : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(250) : warning 204: symbol is assigned a value that is never used: "Mensagem"
C:\Projeto (CLS)\gamemodes\CLS.pwn(424) : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(42 : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(506) : warning 217: loose indentation
C:\Projeto (CLS)\gamemodes\CLS.pwn(574) : warning 203: symbol is never used: "DOF2_Exit"
C:\Projeto (CLS)\gamemodes\CLS.pwn(574) : warning 203: symbol is never used: "PlayerInfo"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Warnings.
Reply
#5

Amigo, que nгo saiba nгo existe veiculo 122

Veja mais wiki bjs!

https://sampwiki.blast.hk/wiki/Vehicles:All

Код:
warning 217: loose indentation
Codigo desalinhado, vocк pode usar esse tabulador: http://tabulador.medianewsonline.com/

Код:
symbol is never used
Nгo foi usado as variaveis, apague
Reply
#6

ta funcionando mas eu queria assim mano tipo que desse pra criar quantos carro quisese e n 1 tipo eu criei um infernos ai dps um elegy ai eu queria que os dois ficasse la e n que apaga-se o infernos pra criar o elegy e vlw por me ajudar
Reply
#7

Tira o:

DestroyVehicle(carrao[playerid]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)