[Ayuda] Ver quien edita Stats
#1

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..

Код:
     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;
    }
Desde ya muchas gracias
Reply
#2

Fбcil en la string usa un SendClientMessageToAll

Saludos.
Reply
#3

Pasa que yo no quiero que se lo envie a todos los users, quiero que se lo envie solamente a los admines... Podrias ayudarme con el codigo..?, no se a que te referis con la string..
Reply
#4

usa la funcion qe tienes en tu sistema de admin!!
puedes verlo en /reportar

abra algo qe dice messagetoadmins
o mensjaeaadmins algoa si busca y de ahi sacas la idea!1

para ponerlo a tu comando
Reply
#5

Код:
    zcmd(congelar, playerid, params[]){
        if(PlayerInfo[playerid][pJDS] < 1) return Message(playerid, COLOR_GRAD2, "ЎNo autorizado!");
		if(!sscanf(params, "u", params[0])){
		    if(params[0] == INVALID_PLAYER_ID) return Message(playerid, COLOR_GRAD2, "Jugador no conectado.");
		    new string[64];
			TogglePlayerControllable(params[0], 0);
			Freezed[params[0]] = 1;
			format(string, sizeof(string), "%s ha congelado a %s",PlayerName(playerid), PlayerName(params[0]));
			Message(params[0], COLOR_RED2, string);
			return A_Info(string);
		} else Message(playerid, COLOR_GRAD2, "Utilize: /congelar <PlayerID>");
        return 1;
    }
Tengo esto, que puedo armar?
Reply
#6

Yo ise uno de los stat pero solo dice tal admin le cambio los stat a tal jugador si lo quieres dime
Reply
#7

aver pasame el comando /report
Reply
#8

Код:
    zcmd(re, playerid, params[])
    {
        if(!IsPlayerConnected(playerid)) return Message(playerid, COLOR_GRAD2, "No estбs conectado");
        if(JustReported[playerid] == 1) return Message(playerid, COLOR_GRAD2, "{D3D751}2 Minutos {FFFFFF}para enviar otro reporte!");
		if(sscanf(params, "us[64]", params[0], params[1])) return Message(playerid, COLOR_GRAD2, "* Use: (/re)portar <playerid> <Razуn>");
		if(IsPlayerConnected(params[0]))
        {
            new string[128];
			format(string, sizeof(string), "{FA4E60}Reporte: [ID:%d]%s, Reporta a: [ID:%d]%s", playerid, PlayerName(playerid), params[0], PlayerName(params[0]));
			ABroadCast(-1, string, 1);
			format(string, sizeof(string), "{FA4E60}Razon: %s", params[1]);
			ABroadCast(-1, string, 1);
			SendClientMessage(playerid, 0x009D4FFF, "Tu reporte fue enviado con exito a los Administradores y sera procesado!");
			JustReported[playerid] = 1;
			PlayerNeedsHelp[playerid] = 1;
			SetTimerEx("ReportReset", 120000, false, "i", playerid);
        } else Message(playerid, COLOR_GRAD2, " Ese jugador estб desconectado.");
        return 1;
    }
Quote:
Originally Posted by XxX(cena)XxX
Посмотреть сообщение
Yo ise uno de los stat pero solo dice tal admin le cambio los stat a tal jugador si lo quieres dime
SISISISI, ME SIRVE ESO, es urgente, muchas gracias compa
Reply
#9

lo tengo ya con lo que tu pasaste con tu comando el problema es que no se como ponerlo asi como lo ponen usteds en codigo: por que si lo pongo normal aca se vera feo.
Reply
#10

agrega [ code] COMANDO [/code ] sin espacio entre corchetes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)