[AYUDA]Porque pasa estoї
#1

Buenas Forum Samp estuve probando como funcionan los comanandos de admin para aparcar autos y tuve un problema.
PROBLEMA :El comando de los user de /v estacionar si estaciona y el de admin /apark i /estacionarauto no estaciona
-їComo que no estaciona?
Digamos Yo uso /v estacionar cuando compro un auto y uso ese comando y apago e samp-server (La consola del servidor)
i luego cuando abro de nuevo si esta en el sitio donde estacione pero con los de /apark y el de /estacionarauto
lo estaciona y cuando pongo /res (comando para respawn coches) estбn donde puse yo el comando anterior pero apago el samp-server y vuelvo abrir no estбn en el lugar que puse si no que vuelve al conse y no puedo asн ordenar los autos os dejo los 3 comando aver si me pueden ayudar
Comando /Estacionarauto
Код:
	zcmd(estacionarauto, playerid, params[])
{
if(PlayerInfo[playerid][pJDS] < 3) return 0;
if(!IsPlayerInAnyVehicle(playerid)) return 0;
new idcar = GetPlayerVehicleID(playerid);
new Float:x, Float:y, Float:z, Float:a;
GetVehiclePos(idcar, x, y, z);
GetVehicleZAngle(idcar, a);
CarInfo[idcar][cLocationx] = x;
CarInfo[idcar][cLocationy] = y;
CarInfo[idcar][cLocationz] = z;
CarInfo[idcar][cAngle] = a;
new model = GetVehicleModel(idcar);
DestroyVehicle(idcar);
CreateVehicle(model, CarInfo[idcar][cLocationx], CarInfo[idcar][cLocationy], CarInfo[idcar][cLocationz], a, CarInfo[idcar][cColorOne], CarInfo[idcar][cColorTwo], -1);
return 1;
}
COMANDO /apark
Код:
    zcmd(apark, playerid, params[])
	{
	    new Float:x,Float:y,Float:z,Float:a;

	    if(PlayerInfo[playerid][pJDS] >= 1)
		{
		    new idcar = GetPlayerVehicleID(playerid);
		    GetVehiclePos(idcar, x, y, z);  GetVehicleZAngle(idcar, a);
			CarInfo[idcar][cLocationx] = x;
				CarInfo[idcar][cLocationy] = y;
					CarInfo[idcar][cLocationz] = z;
						CarInfo[idcar][cAngle] = a;
			Message(playerid, COLOR_GRAD2, " Nuevas coordenadas guardadas. ЎAhora el vehнculo aparecerб aqui!");
		} else Message(playerid, COLOR_GRAD2, "ЎNo autorizado!");
	    return 1;
 	}
Comando de /v estacionar
Код:
 else if(strcmp(params[0],"estacionar",true) == 0)
	        {
	            if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return Message(playerid, COLOR_GREY, "No eres el conductor.");
				if(IsAnOwnableCar(idcar))
				{
				    if(PlayerInfo[playerid][pPcarkey] == 9999) return Message(playerid, COLOR_GREY, "Usted no tiene un coche.");
					if(idcar == PlayerInfo[playerid][pPcarkey])
					{
						GetVehiclePos(idcar, x, y, z);
						GetVehicleZAngle(idcar, a);
						CarInfo[idcar][cLocationx] = x;
						CarInfo[idcar][cLocationy] = y;
						CarInfo[idcar][cLocationz] = z;
						CarInfo[idcar][cAngle] = a;
						Message(playerid, COLOR_GRAD2, "Nuevas coordenadas guardadas. ЎAhora el vehнculo aparecerб aqui!");
                        OnPropUpdate(2);
						return 1;
 					}
 					else return Message(playerid, COLOR_GREY, "No estбs en tu vehнculo!");
				}
	        }
	        else if(strcmp(params[0],"estacionar2",true) == 0)
	        {
	            if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return Message(playerid, COLOR_GREY, "No eres el conductor.");
				if(IsAnOwnableCar(idcar))
				{
				    if(PlayerInfo[playerid][pPcarkey2] == 9999) return Message(playerid, COLOR_GREY, "Usted no tiene un coche.");
					if(idcar == PlayerInfo[playerid][pPcarkey2])
					{
						GetVehiclePos(idcar, x, y, z);
						GetVehicleZAngle(idcar, a);
						CarInfo[idcar][cLocationx] = x;
						CarInfo[idcar][cLocationy] = y;
						CarInfo[idcar][cLocationz] = z;
						CarInfo[idcar][cAngle] = a;
						Message(playerid, COLOR_GRAD2, "Nuevas coordenadas guardadas. ЎAhora el vehнculo aparecerб aqui!");
                        OnPropUpdate(2);
						return 1;
 					}
 					else return Message(playerid, COLOR_GREY, "No estбs en tu vehнculo!");
				}
	        }
Reply
#2

Intenta utilizar la funcion "OnPropUpdate(2);" en los CMD's defectuosos.
Reply
#3

Lo puse asн
Код:
zcmd(apark, playerid, params[])
	{
	    new Float:x,Float:y,Float:z,Float:a;

	    if(PlayerInfo[playerid][pJDS] >= 1)
		{
		    new idcar = GetPlayerVehicleID(playerid);
		    GetVehiclePos(idcar, x, y, z);  GetVehicleZAngle(idcar, a);
			OnPropUpdate(2);
			CarInfo[idcar][cLocationx] = x;
				CarInfo[idcar][cLocationy] = y;
					CarInfo[idcar][cLocationz] = z;
						CarInfo[idcar][cAngle] = a;
			Message(playerid, COLOR_GRAD2, " Nuevas coordenadas guardadas. ЎAhora el vehнculo aparecerб aqui!");
		} else Message(playerid, COLOR_GRAD2, "ЎNo autorizado!");
	    return 1;
 	}
y no funciono abrн el samp-server puse el comando (park cerrй y volvн abrir i nada no estaba ahн donde puse
No ahн alguna otra forma para que se guarden bn con un comando las coordenadas de car.cfg
Reply
#4

LOL

Intenta asн:

pawn Код:
zcmd(apark, playerid, params[])
    {
        new Float:x,Float:y,Float:z,Float:a;

        if(PlayerInfo[playerid][pJDS] >= 1)
        {
            new idcar = GetPlayerVehicleID(playerid);
            GetVehiclePos(idcar, x, y, z);  GetVehicleZAngle(idcar, a);
            CarInfo[idcar][cLocationx] = x;
                CarInfo[idcar][cLocationy] = y;
                    CarInfo[idcar][cLocationz] = z;
                        CarInfo[idcar][cAngle] = a;
            Message(playerid, COLOR_GRAD2, " Nuevas coordenadas guardadas. ЎAhora el vehнculo aparecerб aqui!");
OnPropUpdate(2);
        } else Message(playerid, COLOR_GRAD2, "ЎNo autorizado!");
        return 1;
    }
Reply
#5

FUNCIONO MUCHAS GRACIAS tmb lo puse en el otro al final i tmb funciono muchas gracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)