Jump to content

Tibixux

Membru
  • Posts

    30
  • Joined

  • Last visited

Posts posted by Tibixux

  1. Iți fac eu codul corect. uite

    if(dialogid == DIALOG_REGISTER3)
    
    
        {
            if(response)
            {
                new tmppass[64];
                mysql_real_escape_string(inputtext, tmppass);
                new age = strval(tmppass);
                if(age > 1 && age < 100 && response)
                {
                    PlayerInfo[playerid][pAge] = age;
                    new str1[512];
                    mysql_format(SQL,str1,512,"UPDATE users SET `Age`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pAge],PlayerInfo[playerid][pNormalName]);
                    mysql_tquery(SQL,str1,"","");
                    RegistrationStep[playerid] = 4;
                    if(PlayerInfo[playerid][pLanguage] == 2)
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "Introdu adresa de email. Daca nu vrei sa-ti setezi email-ul, poti apasa ok.");
                        SendClientMessage(playerid, COLOR_WHITE, "Emailul te poate ajuta pentru a-ti recupera parola, in caz ca o uiti.");
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "Type your email. If you don't want to set your email, just click ok.");
                        SendClientMessage(playerid, COLOR_WHITE, "The email will help you to recover your password, in case you loose it.");
                    }
                    ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_INPUT, "Email", "(ex: [email protected])", "Ok", "");
                }
                else
                {
                    ShowPlayerDialog(playerid,DIALOG_REGISTER2,DIALOG_STYLE_INPUT,"Your age:","Please enter below the age of your character:","Ok","");
                    return 1;
                }
            }
            return 1;
         }
         if(dialogid == DIALOG_REGISTER4)
         {
              new emailtext[64];
            mysql_real_escape_string(inputtext, emailtext);
            strmid(PlayerInfo[playerid][pEmail], emailtext, 0, strlen(emailtext), 64);
            if(IsMail(inputtext) && response && strlen(inputtext)<30)
             {
                 if(PlayerInfo[playerid][pLanguage] == 2)
                 {
                     format(string, sizeof(string), "Email setat: %s.", PlayerInfo[playerid][pEmail]);
                     SendClientMessage(playerid, COLOR_YELLOW, string);
                }
                else
                {
                    format(string, sizeof(string), "Email set to: %s.", PlayerInfo[playerid][pEmail]);
                     SendClientMessage(playerid, COLOR_YELLOW, string);
                }
             }
             else
             {
                 if(PlayerInfo[playerid][pLanguage] == 2)
                {
                     SendClientMessage(playerid, COLOR_YELLOW, "Ai ales sa nu introduci emailul. Daca vrei sa-ti setezi un email pe cont in viitor, intra pe panel.Nume-Server.ro.");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "You choosed not to set an email. You can go to panel.Nume-Server.ro to set an email at a later date, if you want to.");
                }
            }
            RegistrationStep[playerid] = 0;
            TutTime[playerid] = 1;
            TogglePlayerSpectating(playerid, 1);
            new connectplayer[60],stringplayer[100];
             GetPlayerName(playerid,connectplayer,sizeof(connectplayer));
            format(stringplayer,sizeof(stringplayer),"New account: %s (%d).",connectplayer,playerid);
             HLChat(COLOR_RED2,stringplayer);
              ABroadCast(COLOR_RED2,stringplayer,1);
            foreach(Player,iss)
            {
                if(PlayerInfo[iss][pHelper] > 0 || PlayerInfo[iss][pAdmin] > 0)
                {
                    KillTimer(deathdeletetime[iss]);
                    SendDeathMessageToPlayer(iss, INVALID_PLAYER_ID, playerid, 200);
                    deathdeletetime[iss] = SetTimerEx("DeleteDeathMessage",30000,0,"d",iss);
                }
            }
            return 1;
         }
     

    Aștept sa imi zici daca e bine

  2. Descrierea problemei: Doresc să stiu cum pot face, sa nu poti da park intr-o anumită zonă
    Liniile de cod / sursa / script-ul(obligatoriu): aceasta este comanda park 

    CMD:park(playerid, params[])
    {
    	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    	if(PlayerInfo[playerid][pPcarkey] == 0 && PlayerInfo[playerid][pmotokey] == 0 && PlayerInfo[playerid][phelikey] == 0 && PlayerInfo[playerid][pprcarkey] == 0 && PlayerInfo[playerid][pprcarkey2] == 0 && PlayerInfo[playerid][pPPluscarkey] == 0 && PlayerInfo[playerid][pPPluscarkey2] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{FFB870}You do not have a vehicle.");
    	if(personalcar[playerid] == 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You don't have spawned car.");
    	new engine,lights,alarm,doors,bonnet,boot,objective;
    	new Float:x,Float:y,Float:z,Float:a,getcarid;
    	getcarid = GetPlayerVehicleID(playerid);
    	new interiorr = GetPlayerInterior(playerid),
    		virtuall = GetPlayerVirtualWorld(playerid);
    	GetVehiclePos(getcarid, x, y, z);
    	GetVehicleZAngle(getcarid, a);
    	if(GetPlayerVehicleID(playerid) == personalcar[playerid])
    	{
    		if(IsPlayerInVehicle(playerid,personalcar[playerid]))
    		{
    	    	new Float:health2;
    			GetVehicleHealth(getcarid, health2);
    			if(health2 < 500.0) return SCM(playerid,COLOR_WHITE,"{FFB870}Please repair your car.");
    			if(getcarid == personalcar[playerid])
    			{
    				CarInfo[OwnedVeh(getcarid)][cLocationx] = x;
    				CarInfo[OwnedVeh(getcarid)][cLocationy] = y;
    				CarInfo[OwnedVeh(getcarid)][cLocationz] = z;
    				CarInfo[OwnedVeh(getcarid)][cAngle] = a;
    				DestroyVehicle(personalcar[playerid]);
    				new created = OwnedVeh(getcarid);
    				OwnedVeh(getcarid) = 0;
    	 			new car = CreateVehicle(CarInfo[created][cModel],CarInfo[created][cLocationx],CarInfo[created][cLocationy],CarInfo[created][cLocationz]+1.0,CarInfo[created][cAngle],CarInfo[created][cColorOne],CarInfo[created][cColorTwo],500000);
                    OwnedVeh(car) = created;
    				personalcar[playerid] = car;
    				PutPlayerInVehicleEx(playerid,car,0);
    				new carplate[25];
    				format(carplate, sizeof(carplate), "%s",CarInfo[OwnedVeh(car)][cLicense]);
    			    SetVehicleNumberPlate(car, carplate);
    	      		SetVehicleHealth(car, health2);
    	      		LinkVehicleToInterior(car, interiorr);
    	      		SetVehicleVirtualWorld(car, virtuall);
    	      		vehEngine[car] = 0;
    		    	GetVehicleParamsEx(car,engine,lights,alarm,doors,bonnet,boot,objective);
    		      	SetVehicleParamsEx(car,VEHICLE_PARAMS_OFF,lights,alarm,CarInfo[PlayerInfo[playerid][pPcarkey]][cLock],bonnet,boot,objective);
    			    SetPVarInt(playerid, "Engine", 0);
    				vUpdate(OwnedVeh(car),cLocationxx);
    				vUpdate(OwnedVeh(car),cLocationyx);
    				vUpdate(OwnedVeh(car),cLocationzx);
    				vUpdate(OwnedVeh(car),cAnglex);
    				ModVehicle(car);
    				SendClientMessage(playerid, COLOR_WHITE, "Ai parcat masina cu succes!");
    				Update(playerid, pPcarkeyx);
    				Update(playerid, pmotokeyx);
    				Update(playerid, pprcarkey2x);
    				Update(playerid, pPPluscarkeyx);
    				Update(playerid, pPPluscarkey2x);
    				Update(playerid, pprcarkeyx);
    				return 1;
    			}
    		}
    	}
    	return 1;
    }

    Imagini / Video (optional): Nu am
    Ce am incercat sa fac: Nu am idee cum sa fac sa nu poti da park intr-o zonă, care să fie pusă de tine
    Alte detalii:Multumesc

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.