[Ajuda] /criarcarro, aparecer o nome do adm que criou o veiculo
#1

Amigos queria que quando um adm digitar /criarcarro aparecer o nome exemplo
VEICULO CRIADO PELO ADM ******, Alguem ajuda ai vlw
PHP код:
        if(strcmp(cmd"/CriarCarro"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
         {
            if (
PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
                   return 
1;
            }
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
            }
            if(
CreatedCar >= 96)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
1;
            }
              
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
car;
               
car strval(tmp);
               if(
car 400 || car 611)
               {
                
SendClientMessage(playeridCOLOR_GREY"   Modelo Do Carro Tem Que Ser Entre 411 e 600 !");
                 return 
1;
                 }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
COLOR1;
               
COLOR1 strval(tmp);
               if(
COLOR1 || COLOR1 252)
               {
               
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
                return 
1;
                }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
COLOR2;
               
COLOR2 strval(tmp);
               if(
COLOR2 || COLOR2 252) {
                
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
                return 
1;
                }
               new 
Float:X,Float:Y,Float:Z;
               
GetPlayerPos(playeridX,Y,Z);
               new 
carid CreateVehicle(carX,Y,Z0.0COLOR1COLOR2, -1);
               
CreatedCars[CreatedCar] = carid;
               
CreatedCar ++;
               
format(stringsizeof(string), "   Veiculo %d Criado."carid);
               
SendClientMessage(playeridCOLOR_GREYstring);
          }
          return 
1;
     } 
Reply
#2

Tenta ae

PHP код:
    if(strcmp(cmd"/CriarCarro"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
         {
            if (
PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
                   return 
1;
            }
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
            }
            if(
CreatedCar >= 96)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
1;
            }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
               
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
               return 
1;
               }
               new 
car;
               
car strval(tmp);
               if(
car 400 || car 611)
               {
               
SendClientMessage(playeridCOLOR_GREY"   Modelo Do Carro Tem Que Ser Entre 411 e 600 !");
               return 
1;
               }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
               
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
               return 
1;
               }
               new 
COLOR1;
               
COLOR1 strval(tmp);
               if(
COLOR1 || COLOR1 252)
               {
               
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
               return 
1;
               }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
               
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
               return 
1;
               }
               new 
COLOR2;
               
COLOR2 strval(tmp);
               if(
COLOR2 || COLOR2 252) {
               
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
               return 
1;
               }
               new 
Float:X,Float:Y,Float:Z;
               
GetPlayerPos(playeridX,Y,Z);
               new 
carid CreateVehicle(carX,Y,Z0.0COLOR1COLOR2, -1);
               
CreatedCars[CreatedCar] = carid;
               
CreatedCar ++;
               
Nome[MAX_PLAYER_NAME];
               
GetPlayerName(playeridNomesizeof (Nome));
               
format(stringsizeof(string), "O administrador %s Criou Veiculo Id: %d",Nomecarid);
               
SendClientMessage(playeridCOLOR_GREYstring);
          }
          return 
1;
     } 
Reply
#3

Quote:
Originally Posted by IgorLuiz
Посмотреть сообщение
Tenta ae

PHP код:
    if(strcmp(cmd"/CriarCarro"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
         {
            if (
PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
                   return 
1;
            }
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
            }
            if(
CreatedCar >= 96)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
1;
            }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
               
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
               return 
1;
               }
               new 
car;
               
car strval(tmp);
               if(
car 400 || car 611)
               {
               
SendClientMessage(playeridCOLOR_GREY"   Modelo Do Carro Tem Que Ser Entre 411 e 600 !");
               return 
1;
               }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
               
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
               return 
1;
               }
               new 
COLOR1;
               
COLOR1 strval(tmp);
               if(
COLOR1 || COLOR1 252)
               {
               
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
               return 
1;
               }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
               
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
               return 
1;
               }
               new 
COLOR2;
               
COLOR2 strval(tmp);
               if(
COLOR2 || COLOR2 252) {
               
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
               return 
1;
               }
               new 
Float:X,Float:Y,Float:Z;
               
GetPlayerPos(playeridX,Y,Z);
               new 
carid CreateVehicle(carX,Y,Z0.0COLOR1COLOR2, -1);
               
CreatedCars[CreatedCar] = carid;
               
CreatedCar ++;
               
Nome[MAX_PLAYER_NAME];
               
GetPlayerName(playeridNomesizeof (Nome));
               
format(stringsizeof(string), "O administrador %s Criou Veiculo Id: %d",Nomecarid);
               
SendClientMessage(playeridCOLOR_GREYstring);
          }
          return 
1;
     } 
Eu acho que ele quer faзa uma Label..
Reply
#4

Tenta esse
PHP код:
//Inicio do gm
new Text3D:TextCarro[MAX_VEHICLES];
    if(
strcmp(cmd"/CriarCarro"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pAdmin] < 1)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
                   return 
1;
            }
            if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
            }
            if(
CreatedCar >= 96)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
                return 
1;
            }
            new 
car;
            
car strval(tmp);
            if(
car 400 || car 611)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Modelo Do Carro Tem Que Ser Entre 411 e 600 !");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
                return 
1;
            }
            new 
COLOR1;
            
COLOR1 strval(tmp);
            if(
COLOR1 || COLOR1 252)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /CriarCarro [IDCARRO] [COR1] [COR2]");
                return 
1;
            }
            new 
COLOR2;
            
COLOR2 strval(tmp);
            if(
COLOR2 || COLOR2 252
            {
                
SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !");
                return 
1;
            }
            new 
Float:X,Float:Y,Float:Z;
            
GetPlayerPos(playeridX,Y,Z);
            new 
carid CreateVehicle(carX,Y,Z0.0COLOR1COLOR2, -1);
            
CreatedCars[CreatedCar] = carid;
            
CreatedCar ++;
            
Nome[MAX_PLAYER_NAME];
            
GetPlayerName(playeridNomesizeof (Nome));
            
format(string128"Criado por %s\nModelo: %d\nID: %d"NomeGetVehicleModel(carid), carid);
            
TextCarro[carid] = Create3DTextLabel(string, -10.00.00.015.001);
            
Attach3DTextLabelToVehicle(TextCarro[carid], carid0.00.00.0+1);
            
format(stringsizeof(string), "   Veiculo %d Criado."carid);
            
SendClientMessage(playeridCOLOR_GREYstring);
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)