Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock SavePlayer(playerid) // ulogovan provera ima - bespotrebno jer vrsi u komandi vec
- stock VoziloJeAvion(id)
- {
- if(id == 592 || id == 577 || id == 511 || id == 512 || id == 593 || id == 520 || id == 553 || id == 476 || id == 519 || id == 460 || id == 513) return 1;
- else if(id == 548 || id == 425 || id == 417 || id == 487 || id == 488 || id == 497 || id == 563 || id == 447 || id == 469) return 1;
- else return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeBrod(id)
- {
- if(id == 472 || id == 473 || id == 493 || id == 484 || id == 430 || id == 454 || id == 453 || id == 452 || id == 446) return 1;
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeMotor(id)
- {
- if(id == 462 || id == 448 || id == 581 || id == 522 || id == 461 || id == 521 || id == 523 || id == 463 || id == 468 || id == 471) return 1;
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeBicikla(id)
- {
- if(id == 481 || id == 509 || id == 510) return 1;
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeKamion(id)
- {
- if(id == 499 || id == 498 || id == 609 || id == 524 || id == 578 || id == 455 || id == 403 || id == 414 || id == 443 || id == 514 || id == 515 || id == 408 || id == 431 || id == 437 || id == 538) return 1;
- return 0;
- }
- //ZASTO KORISTITI STOCK KAD MOZEMO MODELID U KOMANDI VEC?
- stock BelaBojaIgraca(playerid)
- {
- SetPlayerColor(playerid,0xFFFFFF00);
- }
- //to je bespotrebno mozemo odma 0xFFFFFFFF u komandi
- stock SCMF(playerid,color,fstring[],{Float, _}:...)
- {
- new n=(numargs()-3)*4;
- if(n)
- {
- new message[128],arg_start,arg_end;
- #emit CONST.alt fstring
- #emit LCTRL 5
- #emit ADD
- #emit STOR.S.pri arg_start
- #emit LOAD.S.alt n
- #emit ADD
- #emit STOR.S.pri arg_end
- do
- {
- #emit LOAD.I
- #emit PUSH.pri
- arg_end-=4;
- #emit LOAD.S.pri arg_end
- }
- while(arg_end>arg_start);
- #emit PUSH.S fstring
- #emit PUSH.C 255
- #emit PUSH.ADR message
- n+=4*3;
- #emit PUSH.S n
- #emit SYSREQ.C format
- n+=4;
- #emit LCTRL 4
- #emit LOAD.S.alt n
- #emit ADD
- #emit SCTRL 4
- return SCM(playerid,color,message);
- }
- else return SCM(playerid,color,fstring);
- }
- //otisao u kurac
- forward AntiAFK();
- public AntiAFK()
- {
- foreach(Player, i)
- {
- if(IsPlayerConnected(i))
- {
- if(!IsPlayerNPC(i) && PlayerInfo[i][pAdmin] < 6)
- {
- GetPlayerPos(i, PlayerPos[i][0], PlayerPos[i][1], PlayerPos[i][2]);
- if(PlayerPos[i][0] == PlayerPos[i][3] && PlayerPos[i][1] == PlayerPos[i][4] && PlayerPos[i][2] == PlayerPos[i][5])
- {
- new string[100];
- format(string,sizeof(string), "[UP:RP] "CRVENA"%s je kikovan sa servera zbog afk-a!", GetName(i));
- AdminGameMaster(-1, string);
- SCM(i, -1, "[UP:RP] "CRVENA"Kikovani ste jer ste bili afk duze od 10 min!");
- Kick(i);
- }
- PlayerPos[i][3] = PlayerPos[i][0];
- PlayerPos[i][4] = PlayerPos[i][1];
- PlayerPos[i][5] = PlayerPos[i][2];
- }
- }
- }
- }
- //ovo nitko vise ne koristi na balkanu zasto koristit npr /* */ umjesto sve izbrisat funkcije vezane uz to?
- forward LoginP(playerid);
- public LoginP(playerid)
- {
- OcistiChat(playerid,16); TextDrawShowForPlayer(playerid, LoginTextdraw[0]);
- TextDrawShowForPlayer(playerid, LoginTextdraw[1]); TextDrawShowForPlayer(playerid, LoginTextdraw[2]);
- InterpolateCameraPos(playerid, 1164.730102, -1187.794677, 307.139495, 1565.853759, -1567.488525, 307.139495, 30000);
- InterpolateCameraLookAt(playerid, 1169.372436, -1187.942382, 305.288421, 1565.404052, -1562.916870, 305.165283, 30000);
- LogRegTimer[playerid] = SetTimerEx("LogReg",8000, true, "d", playerid);
- return 1;
- }
- //zasto ocistichat(playerid, 16); ako netko koristi pagesize i takodje koristi se vec ciscenje na loginu i regu,tako da je ovo bespotrebno
- forward DrogaEfekat(playerid);
- public DrogaEfekat(playerid)
- {
- SetPlayerWeather(playerid, 10); ClearAnimations(playerid); KoristiDrogu[playerid] = 0;
- GameTextForPlayer(playerid,"~w~Efekat droge prosao...", 5000, 3);
- return 1;
- }
- //timer na 5000 ? o boze
- forward SendGMMessage(color, string[]);
- public SendGMMessage(color, string[])
- {
- foreach(Player,i)
- {
- if(PlayerInfo[i][pGM] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- //hmmm ovo se koristi u svakoj funkciji sigurno -.-
- forward SendAdminMessage(color, string[]);
- public SendAdminMessage(color, string[])
- {
- foreach(Player,i)
- {
- if(PlayerInfo[i][pAdmin] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- //hmm i ovo se koristi 100%
- forward CenaRazgovora(playerid);
- public CenaRazgovora(playerid)
- {
- if(PlayerInfo[playerid][pMobKredit] > 0)
- {
- PlayerInfo[playerid][pMobKredit]--;
- SavePlayer(playerid);
- }
- else
- {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE );
- RemovePlayerAttachedObject(playerid, TELEFON_SLOT);
- SetPlayerSpecialAction(TelefonRazgovor[playerid], SPECIAL_ACTION_STOPUSECELLPHONE);
- RemovePlayerAttachedObject(TelefonRazgovor[playerid], TELEFON_SLOT);
- TelefonRazgovor[TelefonRazgovor[playerid]] = -1; TelefonRazgovor[playerid] = -1;
- KillTimer(MobilniCenaRazgovora[playerid]);
- return 1;
- }
- return 1;
- }
- //koliko znam,ovo ne skida pare.. + testirano
- forward UcitajPodesavanja(name[],value[]);
- public UcitajPodesavanja(name[],value[])
- {
- INI_Int("Registracija",ServerInfo[isRegistracija]);
- INI_Int("Oglas",ServerInfo[isOglas]);
- INI_Int("Pitanja",ServerInfo[isPitanja]);
- INI_Int("Report",ServerInfo[isReport]);
- return 1;
- }
- // fali vam smsoglas ukoliko koristite i u scriptfiles>server imate chat koji se ovde ne koristi to dokazuje da ovo nije pravi mod i izbrisite to chat!
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- foreach(Player,i)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- } }
- }
- }
- return 1;
- }
- //te je zastario ima noviji te ima bespotrebnu proveru je li igrac konektovan
- i ima ono g_resetuj i to koji mozete stavit na svoj AC za proveru i to... :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement