CllawSs
Membru-
Posts
19 -
Joined
-
Last visited
Never
About CllawSs
- Birthday 11/20/1998
CllawSs's Achievements
-
Nu te-ai uitat absolut deloc peste ce ti-am spus X_X.
-
Păi prima dată faci o matrice cu 4 coloane gen: [pawn]new Float:RandomSpawnsPaintball[][4] = { { {0.0 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 0.0} // coordonatele spawn };[/pawn] Apoi la SetPlayerSpawn (presupun că ai GF / RPG) foloseşti variabila care spune că eşti în event şi foloseşti funcția pentru spawn random, gen: [pawn]public SetPlayerSpawn(playerid) { if(IsPlayerConnected(playerid)) { if(StartPaintballEvent[playerid] == 1) { new rand = random(sizeof(RandomSpawnsPaintball)); SetPlayerPos(playerid, RandomSpawnsPaintball[rand][0], RandomSpawnsPaintball[rand][1], RandomSpawnsPaintball[rand][2]); SetPlayerFacingAngle(playerid, RandomSpawnsPaintball[rand][3]); } } return 1; }[/pawn] Pentru funcția random ai aici un link: http://wiki.sa-mp.com/wiki/Random
-
Daca vrei ceva invata sa-ti faci, si nu mai cere scripturi. Eu ti-am dat o idee, dezvolt-o.
-
Pai in principiu ai nevoie de un sistem AFK (din cate stiu eu daca respectivii sunt pe ESC este imposibil sa-i omori). Apoi in functia OnPlayerTakeDamage verifici de exemplu: [pawn]if(PlayerAFK[playerid] == 1) { SetPlayerHealth(playerid, amount); }[/pawn]
-
Din ce vad eu aici [pawn]if(!unwanted[car]) { SetTimer("ractime", 10000, 0); SetVehicleToRespawn(car); }[/pawn] Tu activezi timertul si spawnezi imediat masinile la accesarea comenzii. Daca vrei la 10 secunde sterge acel SetvehicleToRespawn si muta-l in ractime.
-
Fă cum a spus WopsS şi mai verifică dacă ai în fişierul include din pawno include-ul dudb.
-
Vezi ca nu ai alta variabila indentica cu "Name".
-
Factiuni, joburi, sisteme... mai la fel ca pe toate celelalte servere. Nota 2/5 pentru munca (editat).
-
Din poze pare cat de cat frumusel (2.5/5). Fa o descriere mai ampla ca sa vada lumea ce contine serverul.
-
Faci asa frumos. [pawn]new strname[MAX_PLAYER_NAME], strlogin2[64]; GetPlayerName(playerid, strname, sizeof(strname)); format(strlogin2, 256, "{C8D4D4}%s s-a conectat la server. %s",strname); ABroadCast(COLOR_LIGHTRED,strlogin2,1);[/pawn] Acum sa-ti explic. [pawn]strname[MAX_PLAYER_NAME][/pawn] Variabila speciala pentru nume. [pawn]GetPlayerName(playerid, strname, sizeof(strname));[/pawn] Asa formezi numele unui jucator. Wiki -> http://wiki.sa-mp.com/wiki/GetPlayerName [pawn]format(strlogin2, 256, "{C8D4D4}%s s-a conectat la server. %s",strname); ABroadCast(COLOR_LIGHTRED,strlogin2,1);[/pawn] Afisezi mesajul.
-
De exemplu faci o functie gen LoadComponentsToVehicle iar acolo extragi componentele vahiculelor, apoi acea functie o folosesti la /park.
-
Poti face si asa. [pawn]CMD:cmds( playerid , params [ ] ) { ShowASSCmds( playerid ); return ( 1 ); } forward ShowASSCmds(playerid); public ShowASSCmds(playerid) { new SASSCmds[600]; if( Limba[ playerid ] == 0 )// Romana { strcat(SASSCmds, "{0000FF}Apocalypse {FFFF00}Super {FF0000}Stunt {00BFFF}Commands!\n"); strcat(SASSCmds, "{00BFFF}Aceste comenzi pot fi folosite in chat(T sau F6). Citeste-le pe toate!\n\n\n"); strcat(SASSCmds, "{FF0000}/v {FFF1B0}- Meniul cu toate vehiculele de pe server.\n"); strcat(SASSCmds, "{FF0000}/car [vehicle name] {FFF1B0}- Pentru a chema o masina mai repede dupa nume/id.\n"); strcat(SASSCmds, "{FF0000}/CreateClan {FFF1B0}- Vrei propriul clan? Foloseste aceasta comanda!\n"); strcat(SASSCmds, "{FF0000}/Teles {FFF1B0}- Toate teleportarile de pe server se afla aici!\n"); strcat(SASSCmds, "{FF0000}/arme {FFF1B0}- Meniu cu arme.\n"); strcat(SASSCmds, "{FF0000}/BArme {FFF1B0}- Super arme\n"); strcat(SASSCmds, "{FF0000}/ro /eng {FFF1B0}- Selectezi limba dorita\n"); strcat(SASSCmds, "{FF0000}/ww, /rw {FFF1B0}- doua seturi de arme.\n"); strcat(SASSCmds, "{FF0000}/Vreme {FFF1B0}- Seteaza-ti propia vreme!\n"); strcat(SASSCmds, "{FF0000}/Givecash {FFF1B0}- Imprumuta prietenii cu niste banii.\n"); strcat(SASSCmds, "{FF0000}/skin {FFF1B0}- Schimbati infatisarea!\n"); strcat(SASSCmds, "{FF0000}/nrg {FFF1B0}- Cheama o motocicleta NRG-500!\n"); strcat(SASSCmds, "{FF0000}/gps [id/off] {FFF1B0}- Nu gasesti un jucator? Foloseste GPS-ul.\n"); strcat(SASSCmds, "{FF0000}/zi, /noapte {FFF1B0}- joaca-te cu soarele!\n"); strcat(SASSCmds, "{FF0000}/credits {FFF1B0}- Nu te-ai intrebat nici o data cine a creat acest server?\n"); strcat(SASSCmds, "{FF0000}/animlist {FFF1B0}- Afla toate animatiile de pe server.\n"); strcat(SASSCmds, "{FF0000}/s {FFF1B0}- Salveaza pozitia!\n"); strcat(SASSCmds, "{FF0000}/l {FFF1B0}- Intoarce-te la pozitia salvata!\n"); ShowPlayerDialog( playerid , 9985 ,DIALOG_STYLE_MSGBOX , "Comenzi" , SASSCmds , "Inchide" , "" ); } else if( Limba[ playerid ] == 1 )// English ( Exemplu tradus in engleza ) { strcat(SASSCmds, "{0000FF}Apocalypse {FFFF00}Super {FF0000}Stunt {00BFFF}Commands!\n"); strcat(SASSCmds, "{00BFFF}These commands can be used in chat(T or F6). Read all.\n\n\n"); strcat(SASSCmds, "{FF0000}/v {FFF1B0}- Menu with all vehicles.\n"); strcat(SASSCmds, "{FF0000}/car [vehicle name] {FFF1B0}- Spawn car with name/id.\n"); strcat(SASSCmds, "{FF0000}/CreateClan {FFF1B0}- You want create a clan ? use /createclan!\n"); strcat(SASSCmds, "{FF0000}/Teles {FFF1B0}- All server teleports is here!\n"); strcat(SASSCmds, "{FF0000}/arme {FFF1B0}- Menu with weapons.\n"); strcat(SASSCmds, "{FF0000}/BArme {FFF1B0}- Super weapons\n"); strcat(SASSCmds, "{FF0000}/ro /eng {FFF1B0}- Select the desired language \n"); strcat(SASSCmds, "{FF0000}/ww, /rw {FFF1B0}- ww Walking weapons , rw Run weapons.\n"); strcat(SASSCmds, "{FF0000}/Vreme {FFF1B0}- Set you own weather!\n"); strcat(SASSCmds, "{FF0000}/Givecash {FFF1B0}- borrow you friends with money.\n"); strcat(SASSCmds, "{FF0000}/skin {FFF1B0}- Change skin!\n"); strcat(SASSCmds, "{FF0000}/nrg {FFF1B0}- Spawn one NRG-500\n"); strcat(SASSCmds, "{FF0000}/gps [id/off] {FFF1B0}- You don't found a player? Use gps and find.\n"); strcat(SASSCmds, "{FF0000}/zi, /noapte {FFF1B0}- zi = day , noapte = night!\n"); strcat(SASSCmds, "{FF0000}/credits {FFF1B0}- Credits for server?\n"); strcat(SASSCmds, "{FF0000}/animlist {FFF1B0}- Animation list.\n"); strcat(SASSCmds, "{FF0000}/s {FFF1B0}- Save your position!\n"); strcat(SASSCmds, "{FF0000}/l {FFF1B0}- Load your position!\n"); ShowPlayerDialog( playerid , 9985 , DIALOG_STYLE_MSGBOX , "Commands " , SASSCmds , "Close" , "" ); } return 1; }[/pawn] Aici nu aveau rost 2024 pentru ca ocupau mult spatiu pe nimic. [pawn]new SASSCmds[600];[/pawn] Din ce pare aici ajung vreo 600-700.
-
Iti trebuie o variabila pentru a tine minte conectarea la baza de date, iar acea variabila o folosesti. [pawn]new loginmysql; forward ConnectMySQL(); public ConnectMySQL() { loginmysql = mysql_connect(SQL_HOST,SQL_USER,SQL_DB,SQL_PASS); if(loginmysql) { printf("[MYSQL]: Conectare la `%s` a avut succes!",SQL_DB); } else { printf("[MYSQL]: [ERROR]: Conectare la `%s` a esuat!",SQL_DB); } return 1; }[/pawn]
-
Bro, tu ai setat cate 20 punte per checkpoint. Scoate asta de la fiecare CP si lasa doar la ultimul. [pawn]PlayerInfo[giveplayerid][stuntPoint] +=20;[/pawn]
-
Poftim comanda [pawn]if(strcmp(cmd, "/news", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { if(SendMessageNews[playerid] == 1) { SendClientMessage(playerid, -1, "Asteapta 60 de secunde (1 minut) !"); return 1; } new newcar = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pMuted] == 1) { format(string, sizeof(string), "You can not speak, you have been silenced for %d seconds.",PlayerInfo[playerid][pMuteTime]); SendClientMessage(playerid, COLOR_LIGHTRED, string); return 1; } if(newcar == 140 || newcar == NR1 || newcar == NR2) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /news [newstext]"); return 1; } if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pHelper] == 0) { for(new i=0; i<MAX_ENTRY; i++) { if(!Swear[0]) continue; Cenzura(result,Swear); } } if(FindIP(result)) /// Anti-Reclama { SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you wrote an IP Adress."); new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "GL BOT: {FFFF00}%s a primit Kick cu motivul: A scris un IP (Reclama)",advertiser); SendClientMessageToAll(COLOR_RED,string); KickLog(string); Kick(playerid); return 1; } if(anty(result) && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0) { new advertiser[MAX_PLAYER_NAME]; GetPlayerName(playerid, advertiser, sizeof(advertiser)); format(string, sizeof(string), "GL BOT: {FFFF00}%s a primit Kick cu motivul: Reclama pe /news",advertiser); SendClientMessageToAll(COLOR_RED,string); Kick(playerid); return 0; } format(string, sizeof(string), "NR %s: %s", sendername, result); OOCNews(COLOR_NEWS,string); PlayerInfo[playerid][pNewsSkill] ++; SendMessageNews[playerid] = 1; SetTimerEx("SendMessageNews", 60000, false, "i", playerid); if(PlayerInfo[playerid][pNewsSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 2, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 3, soon you are able to Fly the News Chopper and talk Live."); } else if(PlayerInfo[playerid][pNewsSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 4, you can fly the News Chopper now."); } else if(PlayerInfo[playerid][pNewsSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your News Reporter Skill is now Level 5, you can now talk Live with any person you want."); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not in the News Van or Chopper !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !"); } }//not connected return 1; }[/pawn] Iar acest callback il pui undeva pe la finalul gamemode-ului. [pawn]if(IsPlayerConnected(playerid)) { if(IsPlayerConnected(playerid)) { if(SendMessageNews[playerid] == 1) { SendMessageNews[playerid] = 0; } } }[/pawn]