SHOW:
|
|
- or go back to the newest paste.
| 1 | //godine , pol , drzava , mail | |
| 2 | if(dialogid == DIALOG_POL) | |
| 3 | {
| |
| 4 | if(response) | |
| 5 | {
| |
| 6 | if(listitem == 0) | |
| 7 | {
| |
| 8 | PlayerInfo[playerid][pPol] = 1; | |
| 9 | ClearChatBox(playerid, 5); | |
| 10 | SendClientMessage(playerid, -1, ""SPLAVA"________________"); | |
| 11 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste Musko."); | |
| 12 | SendClientMessage(playerid, -1, ""SPLAVA"________________"); | |
| 13 | SetPlayerSkin(playerid, 20); | |
| 14 | PlayerInfo[playerid][pSkin] = 20; | |
| 15 | SavePlayer(playerid); | |
| 16 | ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""BELA"Koliko imate godina?",""SPLAVA"Molimo vas upisite koliko imate godina.\n\n"SPLAVA"Najvise: "CRVENA"50.\n"SPLAVA"Najmanje: "CRVENA"10.","Izaberi","Izlaz"); | |
| 17 | } | |
| 18 | if(listitem == 1) | |
| 19 | {
| |
| 20 | PlayerInfo[playerid][pPol] = 2; | |
| 21 | ClearChatBox(playerid, 5); | |
| 22 | SendClientMessage(playerid, -1, ""SPLAVA"_________________"); | |
| 23 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste Zensko."); | |
| 24 | SendClientMessage(playerid, -1, ""SPLAVA"_________________"); | |
| 25 | SetPlayerSkin(playerid, 91); | |
| 26 | PlayerInfo[playerid][pSkin] = 91; | |
| 27 | SavePlayer(playerid); | |
| 28 | ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""BELA"Koliko imate godina?",""SPLAVA"Molimo vas upisite koliko imate godina.\n\n"SPLAVA"Najvise: "CRVENA"50.\n"SPLAVA"Najmanje: "CRVENA"10.","Izaberi","Izlaz"); | |
| 29 | } | |
| 30 | } | |
| 31 | } | |
| 32 | if(dialogid == DIALOG_GODINE) | |
| 33 | {
| |
| 34 | if(!response) | |
| 35 | {
| |
| 36 | Kick(playerid); | |
| 37 | } | |
| 38 | else | |
| 39 | {
| |
| 40 | if(strlen(inputtext)) | |
| 41 | {
| |
| 42 | new age = strval(inputtext); | |
| 43 | if(age > 50 || age < 10) | |
| 44 | {
| |
| 45 | ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,""BELA"Koliko imate godina?",""SPLAVA"Molimo vas upisite koliko imate godina.\n\n"SPLAVA"Najvise: "CRVENA"50.\n"SPLAVA"Najmanje: "CRVENA"10.","Izaberi","Izlaz"); | |
| 46 | } | |
| 47 | else | |
| 48 | {
| |
| 49 | PlayerInfo[playerid][pGodine] = age; | |
| 50 | new string[64]; | |
| 51 | ClearChatBox(playerid, 5); | |
| 52 | SendClientMessage(playerid, -1, ""SPLAVA"______________________"); | |
| 53 | format(string, sizeof(string),""BELA"Ok,vi imate %d godine.",age); | |
| 54 | SendClientMessage(playerid, -1, string); | |
| 55 | SendClientMessage(playerid, -1, ""SPLAVA"______________________"); | |
| 56 | SavePlayer(playerid); | |
| 57 | ShowPlayerDialog(playerid,DIALOG_DRZAVA,DIALOG_STYLE_LIST,""BELA"Odakle ste?",""SPLAVA"Srbija\n"SPLAVA"Hrvatska\n"SPLAVA"Bosna i Hercegovina\n"SPLAVA"Makedonija\n"SPLAVA"Crne Gora\n"SPLAVA"Republika Srpska","Izaberi","Izlaz"); | |
| 58 | } | |
| 59 | } | |
| 60 | else | |
| 61 | {
| |
| 62 | return 0; | |
| 63 | } | |
| 64 | } | |
| 65 | } | |
| 66 | if(dialogid == DIALOG_DRZAVA) | |
| 67 | {
| |
| 68 | if(response) | |
| 69 | {
| |
| 70 | if(listitem == 0) | |
| 71 | {
| |
| 72 | PlayerInfo[playerid][pDrzava] = 1; | |
| 73 | ClearChatBox(playerid, 5); | |
| 74 | SendClientMessage(playerid, -1, ""SPLAVA"____________________"); | |
| 75 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste iz "SPLAVA"Srbije."); | |
| 76 | SendClientMessage(playerid, -1, ""SPLAVA"____________________"); | |
| 77 | SavePlayer(playerid); | |
| 78 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.",""SPLAVA"Molimo vas unesite vasu e-mail adresu.\n"CRVENA"Urban Country Admin Team.","Izaberi","Izlaz"); | |
| 79 | } | |
| 80 | if(listitem == 1) | |
| 81 | {
| |
| 82 | PlayerInfo[playerid][pDrzava] = 2; | |
| 83 | ClearChatBox(playerid, 5); | |
| 84 | SendClientMessage(playerid, -1, ""SPLAVA"______________________________"); | |
| 85 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste iz "SPLAVA"Hrvatske."); | |
| 86 | SendClientMessage(playerid, -1, ""SPLAVA"______________________________"); | |
| 87 | SavePlayer(playerid); | |
| 88 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.",""SPLAVA"Molimo vas unesite vasu e-mail adresu.\n"CRVENA"Urban Country Admin Team.","Izaberi","Izlaz"); | |
| 89 | } | |
| 90 | if(listitem == 2) | |
| 91 | {
| |
| 92 | PlayerInfo[playerid][pDrzava] = 3; | |
| 93 | ClearChatBox(playerid, 5); | |
| 94 | SendClientMessage(playerid, -1, ""SPLAVA"_________________________________"); | |
| 95 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste iz "SPLAVA"Bosna i Hercegovine."); | |
| 96 | SendClientMessage(playerid, -1, ""SPLAVA"_________________________________"); | |
| 97 | SavePlayer(playerid); | |
| 98 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.",""SPLAVA"Molimo vas unesite vasu e-mail adresu.\n"CRVENA"Urban Country Admin Team.","Izaberi","Izlaz"); | |
| 99 | } | |
| 100 | if(listitem == 3) | |
| 101 | {
| |
| 102 | PlayerInfo[playerid][pDrzava] = 4; | |
| 103 | ClearChatBox(playerid, 5); | |
| 104 | SendClientMessage(playerid, -1, ""SPLAVA"________________________"); | |
| 105 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste iz "SPLAVA"Makedonije."); | |
| 106 | SendClientMessage(playerid, -1, ""SPLAVA"________________________"); | |
| 107 | SavePlayer(playerid); | |
| 108 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.",""SPLAVA"Molimo vas unesite vasu e-mail adresu.\n"CRVENA"Urban Country Admin Team.","Izaberi","Izlaz"); | |
| 109 | } | |
| 110 | if(listitem == 4) | |
| 111 | {
| |
| 112 | PlayerInfo[playerid][pDrzava] = 5; | |
| 113 | ClearChatBox(playerid, 5); | |
| 114 | SendClientMessage(playerid, -1, ""SPLAVA"_______________________"); | |
| 115 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste iz "SPLAVA"Crne Gore."); | |
| 116 | SendClientMessage(playerid, -1, ""SPLAVA"_______________________"); | |
| 117 | SavePlayer(playerid); | |
| 118 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.",""SPLAVA"Molimo vas unesite vasu e-mail adresu.\n"CRVENA"Urban Country Admin Team.","Izaberi","Izlaz"); | |
| 119 | } | |
| 120 | if(listitem == 5) | |
| 121 | {
| |
| 122 | PlayerInfo[playerid][pDrzava] = 6; | |
| 123 | ClearChatBox(playerid, 5); | |
| 124 | SendClientMessage(playerid, -1, ""SPLAVA"______________________"); | |
| 125 | SendClientMessage(playerid, -1, ""BELA"Ok,vi ste iz "SPLAVA"Republika Srpske."); | |
| 126 | SendClientMessage(playerid, -1, ""SPLAVA"______________________"); | |
| 127 | SavePlayer(playerid); | |
| 128 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.",""SPLAVA"Molimo vas unesite vasu e-mail adresu.\n"CRVENA"Urban Country Admin Team.","Izaberi","Izlaz"); | |
| 129 | } | |
| 130 | } | |
| 131 | } | |
| 132 | if(dialogid == DIALOG_EMAIL) | |
| 133 | {
| |
| 134 | if(strlen(inputtext)) | |
| 135 | {
| |
| 136 | if(strfind(inputtext,"@",true) !=-1) | |
| 137 | {
| |
| 138 | new string[100]; | |
| 139 | new INI:File = INI_Open(UserPath(playerid)); | |
| 140 | INI_SetTag(File,"data"); | |
| 141 | INI_WriteString(File,"Email",inputtext); | |
| 142 | format(string, sizeof(string),"%s",inputtext); | |
| 143 | SCM(playerid, -1, string); | |
| 144 | strmid(PlayerInfo[playerid][pEmail], inputtext, 0, strlen(inputtext), 255); | |
| 145 | ClearChatBox(playerid, 5); | |
| 146 | format(string, sizeof(string),""BELA"Vasa e-mail adresa je:"SPLAVA" %s",string); | |
| 147 | SCM(playerid, -1, string); | |
| 148 | ClearChatBox(playerid, 5); | |
| 149 | INI_Close(File); | |
| 150 | } | |
| 151 | else | |
| 152 | {
| |
| 153 | ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,""BELA"Unesite vasu e-mail adresu.","CRVENAE-mail koji ste uneli je nepravilan.\n\n"SPLAVA"Primer: [email protected]","Izaberi","Izlaz"); | |
| 154 | SetSpawnInfo(playerid, 294, 824.9390, -1368.1731, -0.5015, 319.2446, 0, 0, 0, 0, 0, 0); | |
| 155 | SpawnPlayer(playerid); SavePlayer(playerid); | |
| 156 | } | |
| 157 | } | |
| 158 | } | |
| 159 | return 1; | |
| 160 | } | |
| 161 | ||
| 162 | ||
| 163 | ||
| 164 | ||
| 165 | ||
| 166 | ||
| 167 | ||
| 168 | //saveplayer | |
| 169 | ||
| 170 | //~~~~~~~~~~~[SavePlayer]~~~~~~~~~~~~// | |
| 171 | stock SavePlayer(playerid) | |
| 172 | {
| |
| 173 | if(Ulogiran[playerid] == 1) | |
| 174 | {
| |
| 175 | new INI:File = INI_Open(UserPath(playerid)); | |
| 176 | INI_SetTag(File,"data"); | |
| 177 | INI_WriteInt(File, "Novac", PlayerInfo[playerid][pNovac]); | |
| 178 | INI_WriteInt(File, "Level", PlayerInfo[playerid][pLevel]); | |
| 179 | INI_WriteInt(File, "Admin", PlayerInfo[playerid][pAdmin]); | |
| 180 | INI_WriteInt(File, "Drzava", PlayerInfo[playerid][pDrzava]); | |
| 181 | INI_WriteInt(File, "Godine", PlayerInfo[playerid][pGodine]); | |
| 182 | INI_WriteString(File, "Email", PlayerInfo[playerid][pEmail]); | |
| 183 | INI_WriteInt(File, "Pol", PlayerInfo[playerid][pPol]); | |
| 184 | INI_WriteInt(File, "Skin", PlayerInfo[playerid][pSkin]); | |
| 185 | INI_WriteInt(File, "NovacBanka", PlayerInfo[playerid][pNovacBanka]); | |
| 186 | INI_WriteInt(File, "Zlato", PlayerInfo[playerid][pZlato]); | |
| 187 | INI_WriteInt(File, "OtvorenaKnjizica", PlayerInfo[playerid][pOtvorenaKnjizica]); | |
| 188 | INI_WriteInt(File, "RadnaKnjizica", PlayerInfo[playerid][pRadnaKnjizica]); | |
| 189 | INI_WriteInt(File, "Gamemaster", PlayerInfo[playerid][pGamemaster]); | |
| 190 | - | INI_WriteInt(File, "Spawn", PlayerInfo[playerid][pSpawn]); |
| 190 | + | |
| 191 | } | |
| 192 | return 1; | |
| 193 | } |