Za pocetnike (pokusaj skriptanja)

Započeo Enemy Pawno, Februar 02, 2020, 10:25:32 PRE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

ImeGamemoda:Skriptanje Tutorial


Vrsta GameModa:RPG


Jedinstvenost GameModa:Korisne stvari za igrace


Jezik GameModa:Balkanski


Sistemi GameModa:Register/login(login uskoro stize)


Izvorni GameMod:Od 0


Da bi GameMod radio, potrebi su slijedeći Pluginsi:Sve ima u modu


Da bi GameMod radio, potrebi su slijedeći Includsi:Sve ima u modu


Druge stvari:Sam istrazi


Server na kojem je GameMode bio korišten:Skriptanje Tutorial


Slike: https://imgur.com/a/UQdHMjz


Video: https://imgur.com/a/UQdHMjz


Napravio Gamemode::Turbina


Editovao Gamemode:Turbina


Credits:Turbina i MaliPablo za fix baga jednog i errora(hvala legendi)


Download Link: https://www.sendspace.com/file/qs9tj8


Scan Link: https://www.virustotal.com/gui/file-analysis/ZjM3MzExMTAwNWE3ODA1YTRkN2ZkYjJlOTEzYjU5Njg6MTU4MDYzNTQ0OQ==/detection

[pawn]Prati svoj put i gledaj pravo brale,ne furam njihovo sranje  8) :P[/pawn]

Radis greske u OnDialogResponse, primjer:
[pawn]if(dialogid == 1)
{
if(!response) return SendClientMessage(playerid, 0xFF0000FF ,"[ST:RP] Odustali ste!!");
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, 1351.4606,346.9990,20.5009);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Posla!!");
}
case 1:
{
SetPlayerPos(playerid, 1416.8224,261.0812,19.5442);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Policije!!");
}
case 2:
{
SetPlayerPos(playerid, 1302.6123,305.6286,19.5547);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Auto Skole!!");
}
}
}
}
///////////////////
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, 0x0000FFFF , "Izbaceni ste sa servera!");
Kick(playerid);
return 1;
}
user = fopen(filename, io_write);
fwrite(user, inputtext);
fclose(user);
SendClientMessage(playerid, 0x0000FFFF , "Dobro Dosli na ST:RP");
}[/pawn]

DIALOGID = if(dialogid == 1) ne radi se ovako.

[pawn]
enum
{
   DIALOG_HELP,
   DIALOG_HELP_2
}

CMD:test(playerid, const params[])
{
   ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{54ff73}dialog {ffffff}Help", "Test dialog 1", "Uredu", "");
   return 1;
}

CMD:test2(playerid, const params[])
{
   ShowPlayerDialog(playerid, DIALOG_HELP_2, DIALOG_STYLE_MSGBOX, "{54ff73}dialog {ffffff}Help", "Test dialog 2", "Uredu", "Izlaz");
   return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   switch(dialogid)
   {
      case DIALOG_HELP:
      {
         

[/pawn]
vise informacija imas na wiki: https://wiki.sa-mp.com/wiki/ShowPlayerDialog

Nema potrebe da definises boje koje nece nigdje koristit kao iz tvog primjera
[pawn]
#define COLOR_GREY                                           0xAFAFAFAA
#define COLOR_AQUA                                          0x00FFFFFF
#define COLOR_BLACK                                       0x000000FF
#define COLOR_BLUE                                          0x0000FFFF
#define COLOR_BROWN                                       0xA52A2AFF
#define COLOR_CYAN                                          0x00FFFFFF
#define COLOR_DARKBLUE                                       0x00008BFF
#define COLOR_GOLD                                          0xFFD700FF
#define COLOR_GRAY                                          0x808080FF
itd itd
[/pawn]
Kada portas igraca na neke kordinate(SetPlayerPos) nema potrebe za SetCameraBehindPlayer


Github: Momenzi
Pikaboot: Website



Citat: .momenzi poslato Februar 02, 2020, 13:22:11 POSLE PODNE
Radis greske u OnDialogResponse, primjer:
[pawn]if(dialogid == 1)
{
if(!response) return SendClientMessage(playerid, 0xFF0000FF ,"[ST:RP] Odustali ste!!");
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, 1351.4606,346.9990,20.5009);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Posla!!");
}
case 1:
{
SetPlayerPos(playerid, 1416.8224,261.0812,19.5442);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Policije!!");
}
case 2:
{
SetPlayerPos(playerid, 1302.6123,305.6286,19.5547);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Auto Skole!!");
}
}
}
}
///////////////////
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, 0x0000FFFF , "Izbaceni ste sa servera!");
Kick(playerid);
return 1;
}
user = fopen(filename, io_write);
fwrite(user, inputtext);
fclose(user);
SendClientMessage(playerid, 0x0000FFFF , "Dobro Dosli na ST:RP");
}[/pawn]

DIALOGID = if(dialogid == 1) ne radi se ovako.

[pawn]
enum
{
   DIALOG_HELP,
   DIALOG_HELP_2
}

CMD:test(playerid, const params[])
{
   ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{54ff73}dialog {ffffff}Help", "Test dialog 1", "Uredu", "");
   return 1;
}

CMD:test2(playerid, const params[])
{
   ShowPlayerDialog(playerid, DIALOG_HELP_2, DIALOG_STYLE_MSGBOX, "{54ff73}dialog {ffffff}Help", "Test dialog 2", "Uredu", "Izlaz");
   return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   switch(dialogid)
   {
      case DIALOG_HELP:
      {
         

[/pawn]
vise informacija imas na wiki: https://wiki.sa-mp.com/wiki/ShowPlayerDialog

Nema potrebe da definises boje koje nece nigdje koristit kao iz tvog primjera
[pawn]
#define COLOR_GREY                                           0xAFAFAFAA
#define COLOR_AQUA                                          0x00FFFFFF
#define COLOR_BLACK                                       0x000000FF
#define COLOR_BLUE                                          0x0000FFFF
#define COLOR_BROWN                                       0xA52A2AFF
#define COLOR_CYAN                                          0x00FFFFFF
#define COLOR_DARKBLUE                                       0x00008BFF
#define COLOR_GOLD                                          0xFFD700FF
#define COLOR_GRAY                                          0x808080FF
itd itd
[/pawn]
Kada portas igraca na neke kordinate(SetPlayerPos) nema potrebe za SetCameraBehindPlayer

Trebati ce mi za ono sto trebam da uradi

Turbina hahahahhaah umro sam


nije lose za pocetnike

Pored toga sto mi marno nick nista drugo ne primjetim  :D

Citat: Turbo poslato Februar 02, 2020, 15:28:46 POSLE PODNE
Pored toga sto mi marno nick nista drugo ne primjetim  :D

Nemoj tako tvoje ime mi se dopada xD ovo je brt 0.0.0.0.0.0.0.0.1 verzija tkd nema nista samo Text-ovi,cmd neke i ta sranja,reg i to

Citat: .momenzi poslato Februar 02, 2020, 13:22:11 POSLE PODNE
Radis greske u OnDialogResponse, primjer:
[pawn]if(dialogid == 1)
{
if(!response) return SendClientMessage(playerid, 0xFF0000FF ,"[ST:RP] Odustali ste!!");
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerPos(playerid, 1351.4606,346.9990,20.5009);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Posla!!");
}
case 1:
{
SetPlayerPos(playerid, 1416.8224,261.0812,19.5442);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Policije!!");
}
case 2:
{
SetPlayerPos(playerid, 1302.6123,305.6286,19.5547);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, 0xFF0000FF ,"Taxi vas je dovukao do Auto Skole!!");
}
}
}
}
///////////////////
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, 0x0000FFFF , "Izbaceni ste sa servera!");
Kick(playerid);
return 1;
}
user = fopen(filename, io_write);
fwrite(user, inputtext);
fclose(user);
SendClientMessage(playerid, 0x0000FFFF , "Dobro Dosli na ST:RP");
}[/pawn]

DIALOGID = if(dialogid == 1) ne radi se ovako.

[pawn]
enum
{
   DIALOG_HELP,
   DIALOG_HELP_2
}

CMD:test(playerid, const params[])
{
   ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "{54ff73}dialog {ffffff}Help", "Test dialog 1", "Uredu", "");
   return 1;
}

CMD:test2(playerid, const params[])
{
   ShowPlayerDialog(playerid, DIALOG_HELP_2, DIALOG_STYLE_MSGBOX, "{54ff73}dialog {ffffff}Help", "Test dialog 2", "Uredu", "Izlaz");
   return 1;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   switch(dialogid)
   {
      case DIALOG_HELP:
      {
         

[/pawn]
vise informacija imas na wiki: https://wiki.sa-mp.com/wiki/ShowPlayerDialog

Nema potrebe da definises boje koje nece nigdje koristit kao iz tvog primjera
[pawn]
#define COLOR_GREY                                           0xAFAFAFAA
#define COLOR_AQUA                                          0x00FFFFFF
#define COLOR_BLACK                                       0x000000FF
#define COLOR_BLUE                                          0x0000FFFF
#define COLOR_BROWN                                       0xA52A2AFF
#define COLOR_CYAN                                          0x00FFFFFF
#define COLOR_DARKBLUE                                       0x00008BFF
#define COLOR_GOLD                                          0xFFD700FF
#define COLOR_GRAY                                          0x808080FF
itd itd
[/pawn]
Kada portas igraca na neke kordinate(SetPlayerPos) nema potrebe za SetCameraBehindPlayer
Ili da jednostavno koristi easyDialog.inc ?

[pawn]
#include <easyDialog>

// Example:
public OnPlayerSpawn(playerid) {
    Dialog_Show(playerid, dialog_WELCOME, DIALOG_STYLE_MSGBOX,
        "Welcome",
        "%s, welcome to our server!",
        "X", "",
        GetName(playerid)
    );
    return 1;
}

Dialog:dialog_WELCOME(playerid, response, listitem, inputtext[]) {
    if (!response)
        return 1;

    if (response) {
        GivePlayerMoney(playerid, 400000);
        // itd...
    }   
    return 1;
}
[/pawn]

Moze i tako ako mu je lakse al cisto sumljam


Github: Momenzi
Pikaboot: Website

Moj savet pogledaj malo strane forume, i koristi case-ove za dialoge!

Hvala svima biti ce update sigurno ali tek uskoro dodati cu par sistema obrisati neke stvari napraviti komande dodati login sistem
itd....
Poslusati cu vase savjete.Hvala vam legende ste  ::)

brate,pokusaj kopirati neki gamemod al da nije ono bukv sve isto nego ubacis nesto sa jednog gamemoda pa ides na drugi nadjes neki sistem ili nes drugo.
@tema dobro je za pocetnika
Glumi da je drska, a celi grad je prska.
Skripter u pokusaju...

haahahah turbina

Tema 6/10
klizim po mahali skrolam instagram

Wannabe Pawno Developer
igram samp od 2008 xD
Najjači lik na samp sceni Ksunder
Facebook:Никола Пенслкејс