SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Archive

 
 
Thread Tools Display Modes
Old 20/04/2012, 12:04 PM   #1
Glavonja
Little Clucker
 
Join Date: Jan 2012
Posts: 16
Reputation: 3
Default [POMOC]Pravila prije registrovanja

Skripta koju koristim: CLRP Edit tacnije TechLand Xperia
Detaljan opis problema: Ovako, zelio bih da igrac koji nije registrovan da kada tek udje na server otvori mu pravila u dialogu sa kojima se mora sloziti inace da ga kicka. Ja vec imam pripremljena pravila samo neznam kako da ubacim pa mi pomozite molim vas.
Dio skripte:
Ovo je dialog sa pravilima koji sam napravio i koji treba treba ubaciti prije registracije na server
Code:
SetPlayerCameraPos(playerid, 1662.2316,-1329.3037,164.4707);
	SetPlayerCameraLookAt(playerid, 1642.2316,-1329.3037,164.4707);
	//SetPVarInt(playerid, "Reg", 0);
	new stru1[400];
	new stru2[400];
	new stru3[400];
	new stru4[400];
	new stru5[64];
	new stru[1500];
	format(stru1, sizeof(stru1), "{FFFFFF}Dobrodosli na Balkan-server uklonjen! server!\n\n{33CCFF}Najprije cemo Vam postaviti neke od uslova koriscenja, i pravila servera (ukratko).\nUkoliko ih prihvatite, moci cete da nastavite proces registracije, a ukoliko\nodbijete, registracija ce Vam biti onemogucena.");
	format(stru2, sizeof(stru2), "\n\n\n {FF0000}> In Character ime <\n{FFFFFF} - Ime mora biti realno. To znaci da ono mora biti u formatu Ime_Prezime, npr. Pera_Peric\n - Vase ime ne sme nikoga vredjati na bilo koji nacin\n - Vase ime ne sme biti ime neke javne(poznate) licnosti.\n\n\n {FF0000}> Pravila servera (ukratko) <");
	format(stru3, sizeof(stru3), "\n{FFFFFF} - Nacionalizam, diskriminacija po bilo kom osnovu, i bilo kakvo vredjanje jesu ZABRANJENI!\n - Iskoriscavanje gresaka u skripti je STROGO zabranjeno i moze dovesti do trajnog BANA!\n - Upotreba modifikacija koje donose bilo kakvu prednost nad ostalim igracima (tzv. cheatovi)\n   takodje je strogo zabranjeno i nece se tolerisati!\n  VISE PRAVILA NA FORUMU!!!");
	format(stru4, sizeof(stru4), "\n\n\n{FF0000} > Uslovi koriscenja <\n {FFFFFF}- Pritiskom na dugme 'Slazem se!' obavezujete se da:\n\n - Cete se striktno pridrzavati gore navedenih pravila, kao i svih drugih pravila\n - Cete svaku gresku (bug) koju primetite prijaviti na nasem forumu\n - Necete kriviti BL zajednicu za bilo kakvu stetu nacinjenu Vasem nalogu (npr. gubitak lozinke).");
	format(stru5, sizeof(stru5), "\n\n\n\t {33CCFF}www.bl-gaming.info");
	format(stru, sizeof(stru), "%s %s %s %s %s", stru1, stru2, stru3, stru4, stru5);
	ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{33CCFF}[BL] Uslovi koriscenja", stru, "Slazem se!", "Ne slazem se");
Evo sada neki djelovi iz gamemoda
Code:
public OnPlayerRequestClass(playerid, classid)
{
	PlayerInfo[playerid][pModel] = Peds[classid][0];

	if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1 && IsPlayerNPC(playerid) !=1)
	{
		ClearChatbox(playerid, 10);
		if (gPlayerAccount[playerid] != 0)
		{
			new loginstring[512];
			new loginname[64];
   			PlayAudioStreamForPlayer(playerid, "http://www.lucz.com/semmicico/SETLIST_NEW/RHCP%20-%20Around%20The%20World.mp3");
   			
     		ClearChatbox(playerid, 10);
     		new rand = random(sizeof(gRandomCamPos));
			/*SetPlayerCameraPos(playerid, -1529.9429,379.6341,71.6570); SetPlayerCameraLookAt(playerid, -1723.2122,591.1265,177.3318);*/
			SetPlayerCameraPos(playerid, gRandomCamPos[rand][0], gRandomCamPos[rand][1],gRandomCamPos[rand][2]);
			SetPlayerCameraLookAt(playerid, gRandomCamLookAt[rand][0], gRandomCamLookAt[rand][1],gRandomCamLookAt[rand][2]);
			SetPlayerPos(playerid, gRandomCamPos[rand][0], gRandomCamPos[rand][1],gRandomCamPos[rand][2]);
            TextDrawShowForPlayer(playerid, newlogin0);
            TextDrawShowForPlayer(playerid, newlogin1);
            TextDrawShowForPlayer(playerid, newlogin2);
            TextDrawShowForPlayer(playerid, newlogin3);
            TextDrawShowForPlayer(playerid, newlogin4);
            TextDrawShowForPlayer(playerid, newlogin5);
            TextDrawShowForPlayer(playerid, newlogin6);
            TextDrawShowForPlayer(playerid, newlogin7);
            TextDrawShowForPlayer(playerid, newlogin8);
            TextDrawShowForPlayer(playerid, newlogin9);
            TextDrawShowForPlayer(playerid, newlogin10);
            TextDrawShowForPlayer(playerid, newlogin11);
            TextDrawShowForPlayer(playerid, newlogin12);
            TextDrawShowForPlayer(playerid, newlogin13);
            TextDrawShowForPlayer(playerid, newlogin14);
            TextDrawShowForPlayer(playerid, newlogin15);
            TextDrawShowForPlayer(playerid, Logo1);
            TextDrawShowForPlayer(playerid, Logo2);
			GetPlayerName(playerid,loginname,sizeof(loginname));
			format(loginstring,sizeof(loginstring),"{FFFFFF}Dobrodosli {00a2f5}%s\n{FFFFFF}Vas nalog je pronadjen. Molimo upisite svoju lozinku:",loginname);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"{00a2f5}Balkan server uklonjen! - PRIJAVA",loginstring,"Prijava","Izadji");
		}
		else
		{
			gPlayerAccount[playerid] = 0;
            new regstring[512];
			new regname[64];
            GetPlayerName(playerid,regname,sizeof(regname));
			SendClientMessage(playerid, ZELENKASTA, "Balkan Lights | Vase korisnicko {FFFFFF}Ime {48E31C}nije Registrirano | Molimo registrujte se na {FFFFFF}server {48E31C}da biste mogli igrati!.");
   			format(regstring,sizeof(regstring),"U polje ispod unesite lozinku koju zelite da koristite\nprilikom ulaska na server\n\nNapomena: Svoju lozinku znate samo VI!\nBL ne odgovara u slucaju kradje naloga, gubitka lozinke,\ngubitka imovine (izuzetek su greske u skripti)\n\nBL nikada nece traziti Vasu lozinku!");
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"[BL] Registracija - [Kreiranje naloga] [OOC]",regstring,"Registruj","Izadji");
		}
		PlayerInfo[playerid][pModel] = Peds[classid][0];
		SetPlayerTeamFromClass(playerid,classid);
	}
	else SpawnPlayer(playerid);
 	return false;
}
Code:
	if(dialogid == 3) // Spol
		{
		    if(RegistrationStep[playerid] == 1)
		    {
			    if(response)
			    {
					if(listitem == 0) // Musko
				    {
				        PlayerInfo[playerid][pSpol] = 1;
				        SendClientMessage(playerid, ZELENKASTA, "==================================================================");
				        SendClientMessage(playerid, ZELENKASTA, "Ok, znaci {48E31C}musko ste.");
				        SendClientMessage(playerid, ZELENKASTA, "2. Odaberite svoje godine.");
				        SendClientMessage(playerid, ZELENKASTA, "==================================================================");
				        ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "{48E31C}Registracija - {F3FF02}Koliko imate godina?", "10 \n11 \n12 \n13 \n14 \n15 \n16 \n17 \n18 \n19 \n20 \n21 \n22 \n23 \n24 \n25 \n26 \n27 \n28 \n29 \n30 \n31 \n32 \n33 \n34 \n35 \nVise od 35", "U redu", "Odustani");
				        new maleskin;
				        maleskin = random(sizeof(CivMalePeds));
				        SetPlayerSkin(playerid, maleskin);
				        PlayerInfo[playerid][pChar] = maleskin;
				        RegistrationStep[playerid] = 2;
				        return 0;
				    }
				    if(listitem == 1) // Zensko
				    {
				        PlayerInfo[playerid][pSpol] = 2;
				        SendClientMessage(playerid, ZELENKASTA, "==================================================================");
				        SendClientMessage(playerid, ZELENKASTA, "Ok, znaci {48E31C}zensko ste.");
				        SendClientMessage(playerid, ZELENKASTA, "2. Odaberite svoje godine.");
				        SendClientMessage(playerid, ZELENKASTA, "==================================================================");
				        ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "{48E31C}Registracija - {F3FF02}Koliko imate godina?", "10 \n11 \n12 \n13 \n14 \n15 \n16 \n17 \n18 \n19 \n20 \n21 \n22 \n23 \n24 \n25 \n26 \n27 \n28 \n29 \n30 \n31 \n32 \n33 \n34 \n35", "U redu", "Odustani");
				        new femaleskin;
				        femaleskin = random(sizeof(CivFemalePeds));
				        SetPlayerSkin(playerid, femaleskin);
				        SetPlayerSkin(playerid, femaleskin);
				        PlayerInfo[playerid][pChar] = femaleskin;
				        RegistrationStep[playerid] = 2;
				        return 0;
				    }
Ako treba jos koji dio ja cu staviti
Glavonja is offline  
Old 20/04/2012, 12:24 PM   #2
jotan.
Huge Clucker
 
Join Date: Oct 2010
Posts: 244
Reputation: 14
Default Re: [POMOC]Pravila prije registrovanja

Pa ne pravi se ovako bas server,za ovo trebas praviti dialog sa opcijom kick koja sadrzi
funkcij Kick(playerid);
A ako hoces editovat skriptu ne kontam zasto uopste se trudis to uraditi ako ne znas skriptat
__________________
jotan. is offline  
Old 20/04/2012, 12:33 PM   #3
Glavonja
Little Clucker
 
Join Date: Jan 2012
Posts: 16
Reputation: 3
Default Re: [POMOC]Pravila prije registrovanja

Pa ja sam i postavio da mi pomognete i sa tom opcijom kick i da mi kazete sta nevalja, a sto se tice scriptanja znam scriptati ali nisam sad neki naucnik. Ako hoces pomozi.
Glavonja is offline  
Old 21/04/2012, 11:16 AM   #4
Dude_Lebowski
Big Clucker
 
Join Date: Jan 2012
Posts: 120
Reputation: 8
Default Re: [POMOC]Pravila prije registrovanja

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 0)
    {
        if(!!response) return SendClientMessage(playerid, 0xFFFFFFFF, "Hvala vam sto ste prihvatili pravila");
        Kick(playerid);
        return 1;
    }
    return 0;
}

na vrhu stavi

#pragma tabsize 0
#define Pravilo 0
ako ne mogne Pravilo 0 onda stavi ime tvoga dialoga umjesto "Pravilo"
Dude_Lebowski is offline  
Old 22/04/2012, 07:12 PM   #5
Glavonja
Little Clucker
 
Join Date: Jan 2012
Posts: 16
Reputation: 3
Default Re: [POMOC]Pravila prije registrovanja

Ok jos samo ako mos da mi kazes gdje da smjestim pravila to jest poslije cega da ih stavim eli prije ovih registrationstep ili negdje drugo
Glavonja is offline  
Old 23/04/2012, 02:54 PM   #6
Dude_Lebowski
Big Clucker
 
Join Date: Jan 2012
Posts: 120
Reputation: 8
Default Re: [POMOC]Pravila prije registrovanja

pa eto gore ti pise da prvo idu pravila pa onda registracija xoxo *_*

OnPlayerConnect ili OnPlayerSpawn ili on FilterScriptInt de hoces.
meni najbolje on player spawn :S
Dude_Lebowski is offline  
Old 24/04/2012, 07:31 AM   #7
Glavonja
Little Clucker
 
Join Date: Jan 2012
Posts: 16
Reputation: 3
Default Re: [POMOC]Pravila prije registrovanja

E ubacio sam pravila evo ovdje
Code:
	else
		{
			gPlayerAccount[playerid] = 0;
			SetPlayerCameraPos(playerid, 1662.2316,-1329.3037,164.4707);
        	SetPlayerCameraLookAt(playerid, 1642.2316,-1329.3037,164.4707);
         	//SetPVarInt(playerid, "Reg", 0);
           	new stru1[400];
        	new stru2[400];
           	new stru3[400];
         	new stru4[400];
          	new stru5[64];
         	new stru[1500];
           	format(stru1, sizeof(stru1), "{FFFFFF}Dobrodosli na Balkan-server uklonjen! server!\n\n{33CCFF}Najprije cemo Vam postaviti neke od uslova koriscenja, i pravila servera (ukratko).\nUkoliko ih prihvatite, moci cete da nastavite proces registracije, a ukoliko\nodbijete, registracija ce Vam biti onemogucena.");
         	format(stru2, sizeof(stru2), "\n\n\n {FF0000}> In Character ime <\n{FFFFFF} - Ime mora biti realno. To znaci da ono mora biti u formatu Ime_Prezime, npr. Pera_Peric\n - Vase ime ne sme nikoga vredjati na bilo koji nacin\n - Vase ime ne sme biti ime neke javne(poznate) licnosti.\n\n\n {FF0000}> Pravila servera (ukratko) <");
          	format(stru3, sizeof(stru3), "\n{FFFFFF} - Nacionalizam, diskriminacija po bilo kom osnovu, i bilo kakvo vredjanje jesu ZABRANJENI!\n - Iskoriscavanje gresaka u skripti je STROGO zabranjeno i moze dovesti do trajnog BANA!\n - Upotreba modifikacija koje donose bilo kakvu prednost nad ostalim igracima (tzv. cheatovi)\n   takodje je strogo zabranjeno i nece se tolerisati!\n  VISE PRAVILA NA FORUMU!!!");
         	format(stru4, sizeof(stru4), "\n\n\n{FF0000} > Uslovi koriscenja <\n {FFFFFF}- Pritiskom na dugme 'Slazem se!' obavezujete se da:\n\n - Cete se striktno pridrzavati gore navedenih pravila, kao i svih drugih pravila\n - Cete svaku gresku (bug) koju primetite prijaviti na nasem forumu\n - Necete kriviti BL zajednicu za bilo kakvu stetu nacinjenu Vasem nalogu (npr. gubitak lozinke).");
         	format(stru5, sizeof(stru5), "\n\n\n\t {33CCFF}www.bl-gaming.info");
           	format(stru, sizeof(stru), "%s %s %s %s %s", stru1, stru2, stru3, stru4, stru5);
           	ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{33CCFF}[BL] Uslovi koriscenja", stru, "Slazem se!", "Ne slazem se");
            new regstring[512];
			new regname[64];
            GetPlayerName(playerid,regname,sizeof(regname));
			SendClientMessage(playerid, ZELENKASTA, "Balkan Lights | Vase korisnicko {FFFFFF}Ime {48E31C}nije Registrirano | Molimo registrujte se na {FFFFFF}server {48E31C}da biste mogli igrati!.");
   			format(regstring,sizeof(regstring),"U polje ispod unesite lozinku koju zelite da koristite\nprilikom ulaska na server\n\nNapomena: Svoju lozinku znate samo VI!\nBL ne odgovara u slucaju kradje naloga, gubitka lozinke,\ngubitka imovine (izuzetek su greske u skripti)\n\nBL nikada nece traziti Vasu lozinku!");
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"[BL] Registracija - [Kreiranje naloga] [OOC]",regstring,"Registruj","Izadji");
		}
		PlayerInfo[playerid][pModel] = Peds[classid][0];
		SetPlayerTeamFromClass(playerid,classid);
	}
	else SpawnPlayer(playerid);
 	return false;
}
I tu sam prosao bez warninga i erora e sad kada ubacim ovo public ovdje
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

		new sendername[MAX_PLAYER_NAME];
		new motor,slights,alarm,vrata,Hauba,boot,objective;
		new string[128];
		if(dialogid == 1)
		{
		    if(response) {
Ubacim prije ovo new sendername onda mi pawno samo prestane raditi
Glavonja is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[POMOC] /ad leongrdic Archive 2 20/02/2012 08:46 AM
[Pomoc]UCP zeromaxell Archive 4 01/08/2011 10:53 PM
[Pomoc] Pomoc oko Payday Boban_Minic Archive 0 23/07/2011 05:46 PM
|pomoc| pomoc oko carownership! Nemanja064 Archive 2 12/12/2010 12:36 PM
Glavna pravila Correlli Archive 0 10/11/2009 03:02 PM


All times are GMT. The time now is 10:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.