Tutorial question
#1

I made a tutorial for my RP server and now I have a problem;when I connect the tutorial starts and finishes then I start playing and my friend connects and he doesn't see the tutorial but the tutorial starts for me again.
Can you tell me what i did wrong?I can post any script part that would help solving the problem.
Thanks!
Reply
#2

Is the tutorial in OnPlayerConnect ?
Reply
#3

Nope,here is the tutorial code.I used public funcions and timers.


pawn Код:
public OnPlayerConnect(playerid)
{
    TogglePlayerControllable(playerid,0);
    TogglePlayerSpectating(playerid,0);
    new datoteka[64];
    new name[24];
    GetPlayerName(playerid,name,sizeof(name));
    format(datoteka,sizeof(datoteka),"/korisnici/%s.txt",name);
    dini_IntSet(datoteka,"Logiran",0);
    if(dini_Exists(datoteka))
    {
        Logins(playerid);
        return 1;
    }
    else
    {
        Registers(playerid);
    }
    return 1;
}

pawn Код:
stock tutstr(playerid)
{
    SetPlayerPos(playerid,1331.2592,-958.7347,36.6641);
    cam[playerid][2]= SetTimer("tuta", 10000, false);
    return 1;
}

stock tutpokreni(playerid)
{
    kameratutpo(playerid);
    tutstr(playerid);
    return 1;
}
public tuta(playerid)
{
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"Dobrodoљli na Balkan Madness Server!");
    SendClientMessage(playerid,SP,"Poљto je ovo vaљ prvi put da se na naљem serveru prikazat cemo Vam kratak tutorial.");
    SendClientMessage(playerid,SP," ");
    SendClientMessage(playerid,SP,"Ovo je RolePlay server љto znaci da vaљ lik mora raditi sve љto i Vi u stvarnome ћivotu.");
    SendClientMessage(playerid,SP,"Morate se pridrћavati RolePlay pravila inace ce Vaљ racun biti BAN-an ili cak izbrisan!");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    cam[playerid][3] = SetTimer("tutc", 12000, false);
    return 1;
}

public tutc(playerid)
{
    kamerat1(playerid);
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"Prvo cemo Vam objasniti znacenje IC(In-Character) i OOC(Out-of-character).");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"IC je sve vezano za Vaљega lika u igri,pravite se da Vaљ lik zapravo glumi Vas u");
    SendClientMessage(playerid,SP,"virtualnom svijetu(San Andreasu) i da tako igrate,to je VaЉe ime i prezime lika,to su i sve");
    SendClientMessage(playerid,SP,"radnje vezane za Vaљeg lika u igri npr. Vaљ posao,kuca,automobil,motor.To sve piљete u");
    SendClientMessage(playerid,SP,"obican chat(T),dok zovete nekoga na mobitel ili љaljete poruku.");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SetPlayerPos(playerid,1619.1304,-1030.4988,23.8984);
    cam[playerid][4] = SetTimer("tutd", 18000, false);
    return 1;
}

public tutd(playerid)
{
    kamerat2(playerid);
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"OOC je sve nevezano za Vaљega lika u igri.OOC su npr. imena igraca iznad glava,Vi");
    SendClientMessage(playerid,SP,"neznate njihovo ime i dok ih zapravo ne upoznate preko IC chata(Bok xxx ja sam taj i taj)");
    SendClientMessage(playerid,SP,"OOC je razgovor vezan za Vaљ stvaran ћivot izvan igrice,npr. igrate sa prijateljem");
    SendClientMessage(playerid,SP,"iz razreda i ћelite ga pitati љto imate za zadacu iz matke te za to koristite OOC chat(/b)");
    SendClientMessage(playerid,SP,"koji se koristi i za OOC stvari(eventi,forum...) ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SetPlayerPos(playerid,1619.7627,-1173.6202,55.3156);
    cam[playerid][5] = SetTimer("tute", 15000, false);
    return 1;
}

public tute(playerid)
{
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"RolePlay je igra gdje Vi simulirate pravi zivot i na to se nadovezuju sljedeca pravila:");
    SendClientMessage(playerid,SP,"DM(DeathMatch) je ubijanje drugih igraca bez RolePlay razloga,na primjer:");
    SendClientMessage(playerid,SP,"Vi ste civil i hodate ulicom i naidete na drugoga civila te izvadite m4 i ubijete ga.");
    SendClientMessage(playerid,SP,"To se ne radi u stvarnom zivotu te je to krљenje pravila servera i najcesca kazna je");
    SendClientMessage(playerid,SP,"OOC zatvor na najmanje 30 minuta(kazna se povecava љto ste veci level)!");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    cam[playerid][6] = SetTimer("tutf", 15000, false);
    return 1;
}

public tutf(playerid)
{
    kamerat3(playerid);
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"MG(Meta-Gaming) je mjeљanje IC i OOC chata i koriљtenje OOC informacija za IC radnje.");
    SendClientMessage(playerid,SP,"PG(Power-Gaming) je prisiljavanje nekog igraca na radnje koje ne ћele pomocu /me komande i");
    SendClientMessage(playerid,SP,"raditi radnje koje nisu moguce u stvarnom ћivotu.");
    SendClientMessage(playerid,SP,"DB(Drive By) je pucanje s mjesta vozaca na pjeљake,gaћenj pjeљaka vozilom,gaћenje vozila sa");
    SendClientMessage(playerid,SP,"monsterom i ubijanje elisom helikoptera.");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SetPlayerPos(playerid,1564.1003,-1595.0923,26.6708);
    cam[playerid][7]= SetTimer("tutg", 15000, false);
    return 1;
}

public tutg(playerid)
{
    kamerat4(playerid);
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"BH(Bunny Hoping) je skakanje dok trcite da bi bili brzi i skakanje sa biciklinom na visoka mjesta.");
    SendClientMessage(playerid,SP,"SK(Spawn Killing) je ubijanj igraca dok se on tek spawnao.");
    SendClientMessage(playerid,SP,"RK(Revenge Kill) je ubijanje iz osvete.Npr. neko vas ubije,Vi se stvorite ponovo i idete");
    SendClientMessage(playerid,SP,"ubiti lika љto vas je malo prije ubio.");
    SendClientMessage(playerid,SP,"BA(Bug Abusing) je iskoriљtavanje bugova na serveru - STROGO ZABRANJNO.");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SetPlayerPos(playerid,1364.7399,-1887.6014,20.6641);
    cam[playerid][8]= SetTimer("tuth", 15000, false);
    return 1;
}

public tuth(playerid)
{
    kamerat5(playerid);
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"Zabranjeno je razgovarati o drugim serverima te reklamacija drugis servera vam donosi BAN bez mogucnosti unbana!");
    SendClientMessage(playerid,SP,"Zabranjeno je koriљtenje modova koji vam daju prednost nad drugim igracima!");
    SendClientMessage(playerid,SP,"Zabranjeno je koriљtenja CHEATova i CLEO modifikacija!");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    cam[playerid][9]=SetTimer("tutz", 14000, false);
    return 1;
}

public tutz(playerid)
{
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    SendClientMessage(playerid,SP,"To bi bilo to za totorijal.");
    SendClientMessage(playerid,SP,"Sada sljede par pitanja u vezi RolePlay pravila.");
    SendClientMessage(playerid,SP,"Nakon љto tocno odgovorite na sva pitanja moci cete zapoceti igrati na serveru!");
    SendClientMessage(playerid,SP,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    cam[playerid][10] = SetTimer("tutx", 11000, false);
    return 1;
}

public tutx(playerid)
{
    ShowPlayerDialog(playerid,pit1,DIALOG_STYLE_LIST,"Љto je RolePlay","To je igranje na RP serverima\nTo je mjeљanj IC i OOC chata\nTo je simuliranje stvarnoga ћivota","Dalje","");
    for(new i = 0; i < 20; i++) SendClientMessageToAll(BIJELA," ");
    /*new datoteka[64];
    new name[24];
    GetPlayerName(playerid,name,sizeof(name));
    format(datoteka,sizeof(datoteka),"/korisnici/%s.txt",name);
    dini_IntSet(datoteka,"Tut",1);*/

    return 1;
}
Reply
#4

Replace SetTimer with SetTimerEx

Ex :
pawn Код:
SetTimer("tuta", 10000, false);
pawn Код:
SetTimerEx("tuta", 10000, false, "i", playerid);
Reply
#5

Ok,will do that and tell my friend to connect again.I will post after if it works.
Reply
#6

Works fine now,thanks a lot +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)