їPor quй me manda para BlueBerry?...
#1

Estoy editando una Gamemode, le coloquй el registro de AM:RP como ya hice con varias gm's anteriormente donde funcionу y cuando le das /finalizar hace spawn en BlueBerry en vez de la posiciуn correspondiente, asн es el cуdigo.

Код:
Acб en "OnDialogResponse" donde le das a aceptar al dialogo del comando para finalizar el registro.

	if(dialogid == DIALOG_DATOS){
		if(!response){SelectTextDraw(playerid, 1);}
		if(response){
			for(new i = 0; i < 35; i++){TextDrawHideForPlayer(playerid, Registro[i][playerid]);}
			SetPlayerColor(playerid, 0xFFFFFF00);
			SetPlayerInterior(playerid, 0);
			new transporte = TransporteTemp[playerid];switch(transporte){
				case 1: SetSpawnInfo(playerid, 0, Info[playerid][pRopa], 1684.8544, -2238.5271, 13.5469, 0.0000, 0,0,0,0,0,0);
				case 2: SetSpawnInfo(playerid, 0, Info[playerid][pRopa], 2367.0291, -2545.3472, 3.0000, 0.0000, 0,0,0,0,0,0);
				case 3: SetSpawnInfo(playerid, 0, Info[playerid][pRopa], 1790.4987, -1950.4009, 13.5469, 0.0000, 0,0,0,0,0,0);
				case 4: SetSpawnInfo(playerid, 0, Info[playerid][pRopa], 1814.4125, -1707.2646, 13.5469, 0.0000, 0,0,0,0,0,0);
				case 5: SetSpawnInfo(playerid, 0, Info[playerid][pRopa], 1485.4050, -1712.6135, 14.0469, 0.0000, 0,0,0,0,0,0);}
			CrearCuenta(playerid);
			SpawnJugador2(playerid);
			SetPlayerVirtualWorld(playerid, 0);
			SetCameraBehindPlayer(playerid);
			Info[playerid][pEdad] = EdadTemp[playerid];
			Info[playerid][pSex] = SexoTemp[playerid];
			Info[playerid][pRopa] = SkinTemp[playerid];
			Info[playerid][pRaza] = RazaTemp[playerid];
			//SetPlayerTutorial(playerid, 0);
			//Informacion[playerid][pTutorial] = 1;
			TogglePlayerControllable(playerid, false);
			PlayAudioStreamForPlayer(playerid, "http://8tracks.s3.amazonaws.com/tf/005/565/426/48705.mp3");}
		return 1;}

Funciуn "CrearCuenta".

forward CrearCuenta(playerid);
public CrearCuenta(playerid){
	new query[520];
	new transporte = TransporteTemp[playerid];
	switch(transporte){
		case 1:{
			mysql_format(Conecction, query, sizeof(query), "INSERT INTO `usuarios`(`Nombre`, `Contrasena`, `Ropa`, `Pos_X`, `Pos_Y`, `Pos_Z`, `Sexo`, `Vida`, `Dinero`, `Raza`, `ColorOjos`, `ColorCabello`, `Registrado`, `Edad`, `Nivel`) VALUES ('%s', MD5('%s'),'%i', '1684.8544', '-2238.5271', '13.5469','%i','100','16000','%d','%d','%d','1','%d','1')",
			GNAME(playerid), Info[playerid][pContra], Info[playerid][pRopa], Info[playerid][pSex], Info[playerid][pRaza], Info[playerid][pColorOjos], Info[playerid][pColorCabello], Info[playerid][pEdad]);
			mysql_query(Conecction, query);}
		case 2:{
			mysql_format(Conecction, query, sizeof(query), "INSERT INTO `usuarios`(`Nombre`, `Contrasena`, `Ropa`, `Pos_X`, `Pos_Y`, `Pos_Z`, `Sexo`, `Vida`, `Dinero`, `Raza`, `ColorOjos`, `ColorCabello`, `Registrado`, `Edad`, `Nivel`) VALUES ('%s', MD5('%s'),'%i', '2367.0291', '-2545.3472', '3.0000','%i','100','16000','%d','%d','%d','1','%d','1')",
			GNAME(playerid), Info[playerid][pContra], Info[playerid][pRopa], Info[playerid][pSex], Info[playerid][pRaza], Info[playerid][pColorOjos], Info[playerid][pColorCabello], Info[playerid][pEdad]);
			mysql_query(Conecction, query);}
		case 3:{
			mysql_format(Conecction, query, sizeof(query), "INSERT INTO `usuarios`(`Nombre`, `Contrasena`, `Ropa`, `Pos_X`, `Pos_Y`, `Pos_Z`, `Sexo`, `Vida`, `Dinero`, `Raza`, `ColorOjos`, `ColorCabello`, `Registrado`, `Edad`, `Nivel`) VALUES ('%s', MD5('%s'),'%i', '1790.4987', '-1950.4009', '13.5469','%i','100','16000','%d','%d','%d','1','%d','1')",
			GNAME(playerid), Info[playerid][pContra], Info[playerid][pRopa], Info[playerid][pSex], Info[playerid][pRaza], Info[playerid][pColorOjos], Info[playerid][pColorCabello], Info[playerid][pEdad]);
			mysql_query(Conecction, query);}
		case 4:{
			mysql_format(Conecction, query, sizeof(query), "INSERT INTO `usuarios`(`Nombre`, `Contrasena`, `Ropa`, `Pos_X`, `Pos_Y`, `Pos_Z`, `Sexo`, `Vida`, `Dinero`, `Raza`, `ColorOjos`, `ColorCabello`, `Registrado`, `Edad`, `Nivel`) VALUES ('%s', MD5('%s'),'%i', '1814.4125', '-1707.2646', '13.5469','%i','100','16000','%d','%d','%d','1','%d','1')",
			GNAME(playerid), Info[playerid][pContra], Info[playerid][pRopa], Info[playerid][pSex], Info[playerid][pRaza], Info[playerid][pColorOjos], Info[playerid][pColorCabello], Info[playerid][pEdad]);
			mysql_query(Conecction, query);}
		case 5:{
			mysql_format(Conecction, query, sizeof(query), "INSERT INTO `usuarios`(`Nombre`, `Contrasena`, `Ropa`, `Pos_X`, `Pos_Y`, `Pos_Z`, `Sexo`, `Vida`, `Dinero`, `Raza`, `ColorOjos`, `ColorCabello`, `Registrado`, `Edad`, `Nivel`) VALUES ('%s', MD5('%s'),'%i', '1485.4050', '-1712.6135', '14.0469','%i','100','16000','%d','%d','%d','1','%d','1')",
			GNAME(playerid), Info[playerid][pContra], Info[playerid][pRopa], Info[playerid][pSex], Info[playerid][pRaza], Info[playerid][pColorOjos], Info[playerid][pColorCabello], Info[playerid][pEdad]);
			mysql_query(Conecction, query);}}
	return 1;}

Funciуn "SpawnJugador2".

forward SpawnJugador2(playerid);
public SpawnJugador2(playerid)
{
	GetPlayerIp(playerid, Info[playerid][pIP], 32);
	new str[98];
	BorrarLog(playerid);
	format(str, sizeof(str), "ЎBienvenido a "COLOR_NARANJA_HTML"MamaLand Roleplay"COLOR_BLANCO_HTML", %s!", PlayerName(playerid));
	SendClientMessage(playerid,0xFFFFFFFF,str);
	SendClientMessage(playerid,0xFFFFFFFF, "Dudas relacionadas con el Gamemode usar nuestro comando "COLOR_GRIS_HTML"/duda [Pregunta].");
	SendClientMessage(playerid,0xFFFFFFFF, "Si ves algъn usuario incumplidor de reglas "COLOR_GRIS_HTML"/reportar [ID][Razуn].");
	Info[playerid][pReg]=1;
	SpawnearVehiculosJugador(playerid);
 	SetSpawnInfo(playerid, 0, Info[playerid][pRopa], Info[playerid][pPosX],Info[playerid][pPosY],Info[playerid][pPosZ], 359.4621, 0,0,0,0,0,0);
 	SpawnPlayer(playerid);
	Info[playerid][pNivel] = 1;
	Info[playerid][pRepNecesaria]=7;
	Info[playerid][pPagoDiario]=150;
	Info[playerid][pCostoNivel]=980;
	Info[playerid][pDinero] = 6000;
	Info[playerid][pBanco] = 10000;
	Info[playerid][pHospital] = 0;
	Info[playerid][pPiezas] = 0;
	Info[playerid][pMarihuana] = 0;
	Info[playerid][pSemillas] = 0;
	SetPlayerScore(playerid, 1);
	SetTimerCMD(playerid,1,60*5);
	SetCameraBehindPlayer(playerid);
	SetPlayerSkin(playerid,Info[playerid][pRopa]);
	Info[playerid][pHealth] = 100.0;
	DarCosasSpawn(playerid);
	CancelarRutaCamionero(playerid);
	GuardarCuenta(playerid);
	if(Info[playerid][pAdmin] < 4)
	{
		Check******(playerid);
	}
	Spawneo[playerid] = 1;
	if(Info[playerid][pObjetoEnMano] != 0)
	{
		DarObjetoEnMano(playerid);
	}
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)