[Ajuda] Class
#1

Seguinte,estou com um problema aki !
no meu servidor quando o player se registra ele й obrigado a escolher uma facзгo(ficarб setado dessa facзгo) e uma favela(spawn,ficara setado dessa favela etc...),sу que quando o player clica nessa favela,ao invйs dele spawnar nas coordenadas da favela que eu defini no new , ele spawna no addplayerclass (que fica no gamemodeinit)

Codigo new
Код:
new GangZone[MAX_FACCOES][fac_info] =
{
//CV

	{"Engenho", COR_CV, 1, {-472.4277,1891}, {0.0, 0.0, 0.0, 0.0},  {0.0, 0.0, 0.0} },
	{"Complexo do Alemгo", COR_CV, 1, {-2573.2998,1191}, {0.0, 0.0, 0.0, 0.0},  {0.0, 0.0, 0.0} },
	{"Faz Quem Quer", COR_CV, 1, {-262.7686,1516}, {0.0, 0.0, 0.0, 0.0},  {0.0, 0.0, 0.0} },
onde ele spawna
Код:
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
Reply
#2

Vocк pode usar SetPlayerPos e SetSpawnInfo assim que o jogador selecionar a facзгo desejada.

https://sampwiki.blast.hk/wiki/SetSpawnInfo
https://sampwiki.blast.hk/wiki/SetPlayerPos
Reply
#3

Mais o problema й que meu cуdigo de escolher a favela nгo й incluido no sistema de registro

tipo , esse code , de escolher a facзгo estб no sistema de registro !
Код:
	if(dialogid == DIALOG_LOGIN)
	{
        GetPlayerName(playerid, Nome, sizeof(Nome));
		GetPlayerIp(playerid, IP, sizeof(IP));

		if(response)
		{
			if(!strlen(inputtext))
			{


				SendClientMessage(playerid, COR_AVISO,"{800000}[AVISO] {FFFFFF}Atenзгo digite sua Senha para Logar.");
				format(String, sizeof(String), "{FFFFFF}Bem Vindo ao Servidor {800000}%s{FFFFFF}\n\nVocк ja tem uma Conta Registrada\n\nDigite sua senha para Logar\n\nStatus:{00FF00}Registrado.\n\n{FFFFFF}IP:{800000}%s", Nome, IP);
				ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "» LOGIN FACЗХES LIFE", String, "Logar", "Cancelar");
				return 1;
			}
			
			if(Player[playerid][pNovo] == 1)
			{
			    ShowPlayerDialog(playerid, DIALOG_FACCOES, DIALOG_STYLE_LIST, "Facзхes", "Comando Vermelho\nAmigos dos Amigos\nTerceiro Comando Puro\nOutras Organizaзхes", "Selecionar", "");
			    return 1;
			}
Reply
#4

Й sу vocк colocar SetPlayerPos na dialog DIALOG_FACCOES

Exemplo:
Код:
if(dialogid == DIALOG_FACCOES) {
	if(response == 0) {
		SendClientMessage(playerid, -1, "Por favor selecione uma facзгo.");
		ShowPlayerDialog(playerid, DIALOG_FACCOES, DIALOG_STYLE_LIST, "Facзхes", "Comando Vermelho\nAmigos dos Amigos\nTerceiro Comando Puro\nOutras Organizaзхes", "Selecionar", "");
		return 1;
	}
	if(listitem == 0) {
		SetPlayerPos(playerid, PosX, PosY, PosZ); // Aqui vocк pхe as coordenadas do Comando Vermelho.
		SetPlayerInterior(playerid, 0); // Caso o spawn da facзгo seja em um interior altere o valor de 0.
		SendClientMessage(playerid, -1, "Agora vocк й um membro do Comando Vermelho.");
	}
	if(listitem == 1) {
		SetPlayerPos(playerid, PosX, PosY, PosZ); // Aqui vocк pхe as coordenadas da Amigos dos Amigos.
		SetPlayerInterior(playerid, 0); // Caso o spawn da facзгo seja em um interior altere o valor de 0.
		SendClientMessage(playerid, -1, "Agora vocк й um membro da Amigos dos Amigos.");
	}
	if(listitem == 2) {
		SetPlayerPos(playerid, PosX, PosY, PosZ); // Aqui vocк pхe as coordenadas do Terceiro Comando Puro.
		SetPlayerInterior(playerid, 0); // Caso o spawn da facзгo seja em um interior altere o valor de 0.
		SendClientMessage(playerid, -1, "Agora vocк й um membro do Terceiro Comando Puro.");
	}
	if(listitem == 3) {
		SetPlayerPos(playerid, PosX, PosY, PosZ); // Aqui vocк pхe as coordenadas das outras organizaзхes.
		SetPlayerInterior(playerid, 0); // Caso o spawn da facзгo seja em um interior altere o valor de 0.
	}
}
Reply
#5

deu erro !

Код:
 	if(dialogid == DIALOG_FACCOES)
	{
	    if(response)
		{
			if(listitem == 0)
			{
				new txt[2048];
				for(new i = 0; i < MAX_FACCOES; i ++)
				{
     				if(GangZone[i][Local] == 1)
					{
						format(txt,2048,"%s%s\n", txt, GangZone[i][GZNome]);
					}
				}
				ShowPlayerDialog(playerid, 1000+1,DIALOG_STYLE_LIST, "Favelas CV", txt, "Selecionar", "Voltar");
			}
			 	SetPlayerPos(playerid, -472, 427, 1891); // Aqui vocк pхe as coordenadas do Comando Vermelho.
				SetPlayerInterior(playerid, 0); // Caso o spawn da facзгo seja em um interior altere o valor de 0.
				SendClientMessage(playerid, -1, "Vocк Escolheu a Facзгo CMD");
				}
Код:
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(144) : warning 213: tag mismatch
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(145) : warning 213: tag mismatch
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(146) : warning 213: tag mismatch
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1223) : warning 217: loose indentation
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1227) : warning 217: loose indentation
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1281) : warning 209: function "OnDialogResponse" should return a value
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1282) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1284) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1288) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1291) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1293) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1296) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1304) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1311) : error 010: invalid function or declaration
C:\Users\LACOSTA\Desktop\Facзхes Life - GM\gamemodes\FLNOVA.pwn(1505) : warning 203: symbol is never used: "total"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Reply
#6

Esse cуdigo que vocк postou jб й outro, vocк tem que substituir o dialogo DIALOG_FACCOES pelo oque eu postei.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)