Ma meni je lakse ovako nego ne sprema mi scor pa ne otvaram novu temu evo code..
Login:
public OnPlayerConnect(playerid)
{
firstspawn = 1;
new string;
format(string,sizeof(string),"» %s(ID:%d) se pridruzio na "lyellow2"BattleCraft Trucking Server!",GetPName(playerid),playerid);
SendClientMessageToAll(green2,string);
new file,ip;
GetPlayerIp(playerid,ip,16);
format(file,sizeof(file),"Admin/Bans/%s.ini",ip);
if(INI_Exist(file))
{
INI_Open(file);
new Admin, Reason;
INI_ReadString(Admin,"Admin",24);
INI_ReadString(Reason,"Razlog",128);
format(string,sizeof(string),""lred"\t\tRacun "lyellow"\"%s\""lred" je banan-sljedite podatke: \n\nVase ime: %s \nAdmin ime: %s \nRazlog: %s \nVasa IP: %s \n\n\t\t"lyellow2"Koristi F8 kako bi slikali i postali na forum za Unban "lgrey"www.battle-craft.org.",GetPName(playerid),GetPName(playerid),Admin,Reason,ip);
ShowPlayerDialog(playerid,9002,0,""lred"BANAN",string,"OK","");
format(string,sizeof(string),"*** %s(ID:%d) je automatski kickan-banan!",GetPName(playerid),playerid);
SendClientMessageToAll(red,string);
PlaySound(playerid,1009);
Kick(playerid);
INI_Close();
return 1;
}
else
{
format(file,sizeof(file),"Admin/Users/%s.ini",GetPName(playerid));
if(INI_Exist(file))
{
INI_Open(file);
PInfo = INI_ReadInt("Banan");
INI_Close();
if(PInfo == 1)
{
GetPlayerIp(playerid,ip,16);
format(file,sizeof(file),"Admin/Bans/%s.ini",ip);
INI_Open(file);
INI_WriteString("Igrac",GetPName(playerid));
INI_WriteString("IgracevIP",ip);
INI_WriteString("Admin","Nema");
INI_WriteString("AdminIP","Nema");
INI_WriteString("Razlog","Unban");
INI_Save();
INI_Close();
format(string,sizeof(string),"\t\t"lred"RACUN "lyellow"\"%s\""lred" JE BANAN! \n\nNepokusavajte dobiti Ban ponovo.",GetPName(playerid));
ShowPlayerDialog(playerid,9007,0,""lyellow"Nema "lred"Unban!",string,"OK","");
format(string,sizeof(string),"*** %s(ID:%d) je automatski re-banan pokusava izbjegnuti Ban",GetPName(playerid),playerid);
SendClientMessageToAll(red,string);
PlaySound(playerid,1009);
Kick(playerid);
}
}
}
ClearCheat = 0;
//==================================== [Vehicle Ownership Icons] ===============
SetPlayerMapIcon(playerid, 1, 1743.7543,-1070.9586,23.9687, 55, 0, MAPICON_LOCAL );
//==================================== [Vehicle Ownership Icons] ===============
//=================================== [Fuel Stations Icons] ====================
AddFuel(playerid,9,-96.3130,-1163.8553,2.4082);
AddFuel(playerid,10,-1606.1223,-2714.0071,48.5335);
AddFuel(playerid,11,2116.5847,920.1676,10.8203);
AddFuel(playerid,12,611.6620,1694.9224,6.9922);
AddFuel(playerid,13,619.9069,1685.4465,6.9922);
AddFuel(playerid,14,1938.3922,-1771.5518,13.3828);
AddFuel(playerid,15,-1672.5673,402.4304,7.1797);
AddFuel(playerid,16,2630.6262,1103.9821,11.4220);
AddFuel(playerid,17,-1326.0250,2677.1208,51.0827);
AddFuel(playerid,17,652.4987,-559.6976,16.3359);
AddFuel(playerid,17,-2406.2686,973.9093,45.2969);
//==================================== [Fuel Stations Icons] ===============
refilled = 0;
format(file,sizeof(file),"Admin/Users/%s.ini",GetPName(playerid));
if(fexist(file))
{
format(string,sizeof(string),""lgreen"DobroDosli Nazad, "lyellow2"%s"lgreen"! Upisite vas "lred"password "lgreen"za prijavu!",GetPName(playerid));
ShowPlayerDialog(playerid,Logindialog,1,""lyellow"Logiranje",string,"Login","Nazad");
}
else
{
format(string,sizeof(string),""lgreen"DobroDosli na "lyellow"BattleCraft Trucking"lgreen", "lyellow2"%s"lgreen"! \nVi niste "lred"registrirani"lgreen".\n"lgrey"Molimo vas upiste vas"lyellow2"password "lgreen"za registraciju!",GetPName(playerid));
ShowPlayerDialog(playerid,Registerdialog,1,""lyellow"Registracija",string,"Register","Nazad");
}
INI_Close();
minfo = 0;
minfo = 0;
minfo = 0;
minfo = 0;
minfo = 0;
minfo = 0;
minfo = false;
minfo = 0;
IsPlayerInMission = 0;
PInfo = -1;
PInfo = -1;
speedo = TextDrawCreate(530.000000, 378.000000, " ");
TextDrawBackgroundColor(speedo, 255);
TextDrawFont(speedo, 2);
TextDrawLetterSize(speedo, 0.290000, 1.400000);
TextDrawColor(speedo, -1);
TextDrawSetOutline(speedo, 1);
TextDrawSetProportional(speedo, 1);
TextDrawUseBox(speedo, 1);
TextDrawBoxColor(speedo, 68);
TextDrawTextSize(speedo, 637.000000, 0.000000);
fueltd = TextDrawCreate(530.000000, 394.000000, " ");
TextDrawBackgroundColor(fueltd, 255);
TextDrawFont(fueltd, 2);
TextDrawLetterSize(fueltd, 0.290000, 1.400000);
TextDrawColor(fueltd, -1);
TextDrawSetOutline(fueltd, 1);
TextDrawSetProportional(fueltd, 1);
tripmetertd = TextDrawCreate(530.000000, 410.000000, " ");
TextDrawBackgroundColor(tripmetertd, 255);
TextDrawFont(tripmetertd, 2);
TextDrawLetterSize(tripmetertd, 0.290000, 1.400000);
TextDrawColor(tripmetertd, -1);
TextDrawSetOutline(tripmetertd, 1);
TextDrawSetProportional(tripmetertd, 1);
info = TextDrawCreate(310.000000, 433.000000, " ");
TextDrawAlignment(info, 2);
TextDrawBackgroundColor(info, 34);
TextDrawFont(info, 2);
TextDrawLetterSize(info, 0.260000, 1.400000);
TextDrawColor(info, -1);
TextDrawSetOutline(info, 1);
TextDrawSetProportional(info, 1);
TextDrawUseBox(info, 1);
TextDrawBoxColor(info, 102);
TextDrawTextSize(info, 0.000000, 801.000000);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
firstspawn = 0;
new string;
switch(reason)
{
case 0:
{
format(string,sizeof(string),"» %s(ID:%d) je napustio server "lyellow2"(AFK vrjeme isteklo)",GetPName(playerid),playerid);
SendClientMessageToAll(green2,string);
}
case 1:
{
format(string,sizeof(string),"» %s(ID:%d) je napustio server "lyellow2"(Otisao)",GetPName(playerid),playerid);
SendClientMessageToAll(green2,string);
}
case 2:
{
format(string,sizeof(string),"» %s(ID:%d) je napustio server "lyellow2"(Kickan-Banan)",GetPName(playerid),playerid);
SendClientMessageToAll(green2,string);
}
}
TextDrawDestroy(fueltd);
TextDrawDestroy(info);
TextDrawDestroy(speedo);
TextDrawDestroy(tripmetertd);
TextDrawHideForPlayer(playerid,timetd);
SaveStats(playerid);
PInfo = 0;
PInfo = 0;
PInfo = 0;
PInfo = 0;
PInfo = 0;
PInfo = 0;
PInfo = 0;
PInfo = 0;
PInfo = 0;
wallet = 0;
KillTimer(CanUseRescue);
KillTimer(Checkveh);
KillTimer(Ticket);
KillTimer(Jailtimer);
KillTimer(Fare);
KillTimer(ClearRobbed);
KillTimer(ClearRobbed);
KillTimer(Raped);
KillTimer(Raped);
KillTimer(Raped);
Raped = 0;
Raped = 0;
Showndialog = 0;
hastickettopay = 0;
if (minfo == 1)
{
KillTimer(LTimer);
}
if (minfo == 2)
{
KillTimer(ULTimer);
if (minfo == true)
{
KillTimer(TrailerCheckTimer);
}
}
TogglePlayerAllDynamicCPs(playerid, 1);
IsPlayerInMission = 0;
PInfo[PInfo] = -1;
PInfo[PInfo] = -1;
PInfo = -1;
PInfo = -1;
SetPlayerGPS(playerid,0);
SetPlayerVirtualWorld(playerid,0);
inplane = 0;
ClearCheat = 0;
InBankID = 0;
RecentlyRobbed = 0;
RobbedRecently = 0;
HasClamidia = 0;
Delete3DTextLabel(Shamal);
Delete3DTextLabel(Ranklbl);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid,1186,1955.8129,-2181.6062,13.5865);
//============================== [Icons on spawns] =============================
SetPlayerMapIcon(playerid,27,-484.5272,-530.6782,25.5178,51,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,28,-2185.4797,-211.8183,36.5156,51,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,29,1062.5959,1231.7164,10.8275,51,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,30,2834.2148,912.6044,10.7500,51,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,31,604.5546,1677.6814,6.9922,51,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,32,-1583.5469,-2730.4944,48.5391,51,0,MAPICON_LOCAL);
//============================== [Icons on spawns] =============================
//============================== [Icons on tune garages] =======================
SetPlayerMapIcon(playerid,96,-1938.4731,231.5414,34.1563,27,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,97,-2696.0901,217.7800,4.1797,27,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,98,2397.3884,1026.4083,10.8203,27,0,MAPICON_LOCAL);
SetPlayerMapIcon(playerid,99,2645.1948,-2030.9397,13.5540,27,0,MAPICON_LOCAL);
//============================== [Icons on tune garages] =======================
TextDrawShowForPlayer(playerid,info);
TextDrawShowForPlayer(playerid,timetd);
new rand = random(sizeof(randspawn));
new assrand = random(sizeof(assistancespawn));
if(gTeam == TEAM_TRUCKERS)
{
SetPlayerPos(playerid,randspawn,randspawn,randspawn);
SetPlayerTeamColor(playerid);
GameTextForPlayer(playerid,"~g~Napisite ~r~~h~/work ~g~da krenete raditi",4000,3);
SendClientMessage(playerid,yellow,"» Vi ste "lred"Kamiondzija"lyellow". Uzmite kamion,uzmite prikolicu i Napisite "lred"/work "lyellow"da zapocnete posao!");
SendClientMessage(playerid,yellow,"» Mozete upisat "lred"/phelp"lyellow" da vidite komande "lred"kamiondzije"lyellow" ili napisite /help da vidite server komande!");
}
if(gTeam == TEAM_ASSISTANCE)
{
SetPlayerPos(playerid,assistancespawn,assistancespawn,assistancespawn);
SetPlayerTeamColor(playerid);
SendClientMessage(playerid,yellow,"» Vi ste "lred"Mehanicar"lyellow".Vi morate pomoc igracima u nevolj sa vozilima. Uzmite auto, upisite "lred"2"lyellow" kako bi prikopcali drugi auto!");
SendClientMessage(playerid,yellow,"» Mozete upisat "lred"/phelp"lyellow" da vidite komande Mehanicara, ili Napisite "lred"/help"lyellow" da viidte komande servera!");
}
if(gTeam == TEAM_POLICE)
{
SendClientMessage(playerid,yellow,"» Vi ste "lred"Policajac"lyellow"! Napisite "lred"/phelp"lyellow" da vidite komande Policajca!");
SetPlayerTeamColor(playerid);
if(PInfo == 0)
{
ShowPlayerDialog(playerid,Copsdialog,2,"Odaberite spawn","Los Santos \nLas Venturas \nSan Fierro","Odaberi","");
}
if(GetPlayerWantedLevel(playerid) > 0)
{
SetPlayerWantedLevel(playerid,0);
SendClientMessage(playerid,red,""lwhite"*"lred"Kriminalac uhvacen! Kazna placena $1000!");
GivePlayerMoney(playerid,-1000);
}
}
if(gTeam == TEAM_DRIVER)
{
SendClientMessage(playerid,yellow,"» Vi ste "lred"taxi vozac"lyellow"! Napisite "lred"/phelp "lyellow"za komande o taxi vozacu!");
SetPlayerTeamColor(playerid);
SetPlayerPos(playerid,1768.4202,-1864.4773,13.5738);
}
if(gTeam == TEAM_RAPIST)
{
if(PInfo == 0)
{
ShowPlayerDialog(playerid,Othersdialog,2,"Odaberite profesiju",""lgreen"Silovatelj \n"lyellow2"Hitman","Ok","");
}
}
if(PInfo == 1)
{
Jailplayer(playerid);
SendClientMessage(playerid,red,"Nemozete pobjeci od kazne,povratak za 3 minute!");
}
if(firstspawn == 1)
{
new string;
format(string,sizeof(string),"%s",pRank);
Ranklbl = Create3DTextLabel(string,green2,0,0,0,40.0,0);
Attach3DTextLabelToPlayer(Ranklbl,playerid,0,0,0.4);
SetTimerEx("Clearcheat",1000,false,"i",playerid);
}
firstspawn = 0;
UpdateRank(playerid);
if(gTeam == TEAM_TRUCKERS)
{
TextDrawSetString(info,RandMsgs[random(sizeof(RandMsgs))]);
}
if(gTeam == TEAM_ASSISTANCE)
{
TextDrawSetString(info,AssistanceMsgs[random(sizeof(AssistanceMsgs))]);
}
if(gTeam == TEAM_DRIVER)
{
TextDrawSetString(info,Drivermsgs[random(sizeof(Drivermsgs))]);
}
if(gTeam == TEAM_POLICE)
{
TextDrawSetString(info,Policemsgs[random(sizeof(Policemsgs))]);
}
return 1;
}