17.01.2012, 19:16 
	
	
	
		Hola nuevamente, escribo porque tengo una duda que no se como solucionar, quiero que cuando los admines le den stat a alguien que aparezca en el chat admin que X admin le dio a Y user Tal cosa.
Este es mi comando..
Desde ya muchas gracias
	
	
	
	
Este es mi comando..
Код:
     zcmd(darstat, playerid, params[])
    {
        if(IsPlayerConnected(playerid))
       {
               if(PlayerInfo[playerid][pJDS] > 6)
           {
               if(!sscanf(params, "uii", params[0],params[1],params[2]))
               {
                 new string[32];
                   if(IsPlayerConnected(params[0]))
                {
                    if(params[0] != INVALID_PLAYER_ID)
                    {
                        switch (params[1])
                     {
                        case 1:
                        {
                           PlayerInfo[params[0]][pLevel] = params[2];
                           format(string, sizeof(string), "Nivel: %d", params[2]);
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 2:
                        {
                           PlayerInfo[params[0]][pAccount] = params[2];
                           format(string, sizeof(string), "Cuenta bancaria: $%d", params[2]);
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 3:
                        {
                           PlayerInfo[params[0]][pPnumber] = params[2];
                           format(string, sizeof(string), "Telйfono: #%d", params[2]);
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 4:
                        {
                           PlayerInfo[params[0]][pExp] = params[2];
                           format(string, sizeof(string), "Puntos Respeto: %d", params[2]);
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 5:
                        {
                           PlayerInfo[params[0]][pPhousekey] = params[2];
                           format(string, sizeof(string), "Casa: %d", params[2]);
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 6:
                        {
                           PlayerInfo[params[0]][pPbiskey] = params[2];
                           format(string, sizeof(string), "Negocio facciуn: %d", params[2]);
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 7:
                        {
                           PlayerInfo[params[0]][pHizo] = params[2];
                           format(string, sizeof(string), "Reset de cuenta al relogear.");
                           Message(playerid, COLOR_GRAD2, string);
                        }
                        case 8:
                        {
                            PlayerInfo[params[0]][pPcarkey] = params[2];
                            format(string, sizeof(string), "Vehнculo: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 9:
                        {
                            PlayerInfo[params[0]][pDEagle] = params[2];
                            format(string, sizeof(string), "Deagle: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 10:
                        {
                            PlayerInfo[params[0]][pShotgun] = params[2];
                            format(string, sizeof(string), "Shotgun: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 11:
                        {
                            PlayerInfo[params[0]][pMP5] = params[2];
                            format(string, sizeof(string), "MP5: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 12:
                        {
                            PlayerInfo[params[0]][pAK47] = params[2];
                            format(string, sizeof(string), "AK47: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 13:
                        {
                            PlayerInfo[params[0]][pM4] = params[2];
                            format(string, sizeof(string), "M4: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 14:
                        {
                            PlayerInfo[params[0]][pSniper] = params[2];
                            format(string, sizeof(string), "Sniper: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 15:
                        {
                            PlayerDrunk[playerid] = params[2];
                            format(string, sizeof(string), "Drunk: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerStats(params[0]);
                        }
                        case 16:
                        {
                            PlayerInfo[playerid][pRent] = params[2];
                            format(string, sizeof(string), "Renta: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 17:
                        {
                            PlayerInfo[params[0]][pFStyle] = params[2];
                            format(string, sizeof(string), "Tipo Lucha: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 18:
                        {
                            PlayerInfo[params[0]][pMats] = params[2];
                            format(string, sizeof(string), "Materiales: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 19:
                        {
                            PlayerInfo[params[0]][pContract] = params[2];
                            format(string, sizeof(string), "Contrato: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 20:
                        {
                            PlayerInfo[params[0]][pDrugs] = params[2];
                            format(string, sizeof(string), "Drogas: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 21:
                        {
                            PlayerInfo[params[0]][pSpeed] = params[2];
                            format(string, sizeof(string), "Speed: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 22:
                        {
                            PlayerInfo[params[0]][pEctasy] = params[2];
                            format(string, sizeof(string), "Estasis: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 23:
                        {
                            PlayerInfo[params[0]][pRitalin] = params[2];
                            format(string, sizeof(string), "Ritalin: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 24:
                        {
                            PlayerInfo[params[0]][pHeroina] = params[2];
                            format(string, sizeof(string), "Heroina: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 25:
                        {
                            PlayerInfo[params[0]][pMarihuana] = params[2];
                            format(string, sizeof(string), "Marihuana: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 26:
                        {
                            PlayerInfo[params[0]][pAge] = params[2];
                            format(string, sizeof(string), "Edad: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 27:
                        {
                            PlayerInfo[params[0]][pWalk] = params[2];
                            format(string, sizeof(string), "Estilo andar: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                            SetPlayerWalkingStyle(params[0], PlayerInfo[params[0]][pWalk]);
                        }
                        case 28:
                        {
                            PlayerInfo[params[0]][pJob] = params[2];
                            format(string, sizeof(string), "Trabajo: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        case 29:
                        {
                                    PlayerInfo[params[0]][pCarPremium] = params[2];
                                    format(string, sizeof(string), "AutoPremium: %d", params[2]);
                                    Message(playerid, COLOR_GRAD2, string);
                                }
                                case 30:
                        {
                            PlayerInfo[params[0]][pPcarkey2] = params[2];
                            format(string, sizeof(string), "Vehнculo2: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                         case 31:
                        {
                            PlayerInfo[params[0]][pGSocial] = params[2];
                            format(string, sizeof(string), "Grupo Social: %d", params[2]);
                            Message(playerid, COLOR_GRAD2, string);
                        }
                        default: Message(playerid, COLOR_GRAD2, "Cуdigo invбlido!");
                     }
                    }
               }
               else Message(playerid, COLOR_GRAD2, "ID Invбlida");
               }
               else
               {
                   Message(playerid, COLOR_GRAD1, "Utiliza: /setstat [playerid/PartOfName] [cуdigo] [x]");
               Message(playerid, COLOR_GRAD4, "|1.Nivel - 2.Cuenta Bancaria - 3.Telйfomo - 4.PuntosRespeto ");
               Message(playerid, COLOR_GRAD4, "|5.Casa - 6.Empresa - 7.Negocio - 8.Vehнculo - 9.Deagle");
               Message(playerid, COLOR_GRAD4, "|10.Shotgun - 11.MP5 - 12.ak47 - 13.M4 - 14.Sniper");
               Message(playerid, COLOR_GRAD4, "|15.Drunk - 16.Rent - 17.Lucha - 18.Materiales - 19.Contrato");
               Message(playerid, COLOR_GRAD4, "|20.Drogas - 21.Speed - 22.Extasis - 23.Ritalin - 24.Heroina - 25.Marihuana");
               return Message(playerid, COLOR_GRAD4, "|26.Edad - 27.Estilo - 28.Trabajo - 29.AutoPremium - 30.Coche2");
               }
           } else Message(playerid, COLOR_GRAD2, "No eres administrador");
       }
        return 1;
    }




