-
Posts
519 -
Joined
-
Last visited
-
Days Won
7
Content Type
Profiles
Forums
News
Documentation
Everything posted by andy47
-
if(IsPlayerInRangeOfPoint(playerid,5.0, x, y, z)) Aici modifica range-ul.
-
@FDH_ Salut! Adauga la OnGameModeInit, mysql_log(ALL); si atunci cand accesezi samp-server ( aprinzi serverul ) se va crea un folder cu numele "logs" in acel folderul poti vedea ce erori ai in legatura cu mysql. Invata sa le citesti de acolo si sa cauti/rezolvi problema singur. Vezi sa ai baza de date creata bine si sa ai wamp/xampp aprins. Sfatul meu e sa te uiti pe wiki si sa incerci sa-ti procuri singur un system login/register pe mysql.
-
Dupa mine nu e de la niciun virtual world. E de la coordonatele folosite la functia IsPlayerInRangeOfPoint. Gen tu in baza de date la tabelul tau, pe fiecare linie pune coordonatele pentru ENTER si EXIT specifice fiecarui bizz.
-
http://wiki.sa-mp.com/wiki/MySQL#mysql_connect http://wiki.sa-mp.com/wiki/MySQL#mysql_close http://wiki.sa-mp.com/wiki/MySQL#mysql_errno Cred ca doar astea sunt necesare pentru a conecta la baza de date.
-
I-am spus mai sus si a zis ca nu-i merge....
-
Sigur ai wa-rpg.amx in folderul gamemodes?
-
gamemode0 wa-rpg 1 Vezi sa nu fie pus sub forma de comentariu. Nu functioneaza, dai un recompile la gamemode si dupa incearca din nou.
-
Zi si mie rezolvarea.
-
In mysql_log totul e oke?
-
Uitate in gamemode dupa codul care este accesat dupa logare si posteaza aici, eu cred ca iei kick.
-
Dupa ce te inregistrezi iti apare contul in baza de date?
-
Baza de pe phpmyadmin are numele sapphire2 a ta din gamemode are numele sapphrire2.
-
Sa-ti explic cam cum ar trebui sa fie. Intra in checkpoint, il pui pe modul telespectator, muti camera, pui un timer sa acceseze o functie in care pui sal scoata din modul telespectator si ii aplici cum a spus si mai sus functia setcamerabehindplayer ca sa revina camera pe caracter. Sunt de pe teleton, nu iti iasa, o sa scriu mai diseara. EDIT: Si fi atent la secunde, muti camera in 10 secunde pui si timerul sa se acceseze intr un timp rezonabil. Succes!
-
Iti ajunge una si buna.
-
Odata ce te loghezi primesti crash din cauza la SetPlayerName. Vezi unde ai pus functia atunci cand jucatorul s a logat si posteaza codul. Edit: Cred ca numele jucatorului ori e prea mic ori e prea mare setat. Edit 2: M-am uitat mai bine, cred ca parametrul tau pentru nume e nul in callbackul OnPlayerDisconnect si ar trebui sa-l faci nenull.
-
Nu vreau sa par rautacios, dar din ce stiu eu, e ca nu se cer scripturi,intereseazate mai bine cu ce se ocupa aceasta sectiune. Mult succes!
-
Posteaza si codul de la linile alea.
-
@Banditul a aratat si 2531 si da ai dreptate, probabil a copiat de undeva ca nu stie de ce ii da eroare pentru acel i. Include codul ala intr un loop, foloseste for sau foreach.
-
Pentru a nu te repeta de fiecare data cu functia de preluare a numele GetPlayerName, ai putea crea o functie pentru asta. stock GetName (playerid) { new a [MAX_PLAYER_NAME]; GetPlayerName (playerid, a, sizeof (a)); return a; } Si o folosesti gen: new str [ 128 ]; format (str, sizeof str, "Numele meu este: %s", GetName (playerid)); Sau if (sscanf (params,"u",id)) return Bla Bla format (str,sizeof str, " numele meu este %s, numele lui este %s", GetName (playerid), GetName (id)); Scriu de pe telefon, sper ca ai inteles ideea.
-
CMD:givelicense(playerid, params[]) { if(!IsAInstructor(playerid)) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti instructor."); new x_nr[30],id,sendername[30],giveplayer[30],string[128]; if(sscanf(params, "s[30]u",x_nr,id)) { SendClientMessage(playerid, COLOR_GREY, "Sintaxa: {FFFFFF}/givelicense <License name> <playerid/name>"); SendClientMessage(playerid, COLOR_WHITE, "License: Sailing, Fishing, Weapon, Flying."); return 1; } if(IsInBlacklist(id, 12)) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player este pe blacklistul factiunii tale."); if(IsInBlacklist(id, 19)) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player este pe blacklistul factiunii tale."); if(id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu este conectat."); if(strcmp(x_nr,"flying",true) == 0) { PlayerInfo[playerid][pCommands] ++; Update(playerid, pCommandsx); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(id, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "I-ai dat licenta de zbor de %s.",giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Instructor %s ti-a dat licenta de zbor.",sendername); SendClientMessage(id, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de zbor.",sendername,giveplayer); SendFactionMessage(12,COLOR_WHITE,string); SendFactionMessage(19, COLOR_WHITE, string); PlayerInfo[id][pFlyLic] = 1; PlayerInfo[id][pFlyLicT] = 100; Update(id, pFlyLicx); Update(id, pFlyLicTx); format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]); SCM(playerid, COLOR_WHITE, string); return 1; } else if(strcmp(x_nr,"sailing",true) == 0) { PlayerInfo[playerid][pCommands] ++; Update(playerid, pCommandsx); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(id, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "I-ai dat licenta de navigatie lui %s.",giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Instructor %s ti-a dat licenta de navigatie.",sendername); SendClientMessage(id, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de navigatie.",sendername,giveplayer); SendFactionMessage(12,COLOR_WHITE,string); SendFactionMessage(19, COLOR_WHITE, string); PlayerInfo[id][pBoatLic] = 1; PlayerInfo[id][pBoatLicT] = 100; Update(id, pBoatLicx); Update(id, pBoatLicTx); format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]); SCM(playerid, COLOR_WHITE, string); return 1; } else if(strcmp(x_nr,"fishing",true) == 0) { PlayerInfo[playerid][pCommands] ++; Update(playerid, pCommandsx); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(id, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "I-ai dat licenta de pescar lui %s.",giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Instructor %s ti-a dat licenta de pescar.",sendername); SendClientMessage(id, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de pescar.",sendername,giveplayer); SendFactionMessage(12,COLOR_WHITE,string); SendFactionMessage(19, COLOR_WHITE, string); PlayerInfo[id][pFishLic] = 1; PlayerInfo[id][pFishLicT] = 100; Update(id, pFishLicx); Update(id, pFishLicTx); format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]); SCM(playerid, COLOR_WHITE, string); return 1; } else if(strcmp(x_nr,"weapon",true) == 0) { PlayerInfo[playerid][pCommands] ++; Update(playerid, pCommandsx); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerName(id, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "I-ai dat licenta de arme lui %s.",giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Instructor %s ti-a dat licenta arme.",sendername); SendClientMessage(id, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "{008080}(School Instructors Dispatch){FFFFFF} %s i-a acordat lui %s licenta de arme.",sendername,giveplayer); SendFactionMessage(12,COLOR_WHITE,string); SendFactionMessage(19, COLOR_WHITE, string); PlayerInfo[id][pGunLic] = 1; PlayerInfo[id][pGunLicT] = 100; Update(id, pGunLicTx); Update(id, pGunLicx); format(string, sizeof(string), "{008080}(Raport Status){FFFFFF} +1 raport point, total raport points: %d.", PlayerInfo[playerid][pCommands]); SCM(playerid, COLOR_WHITE, string); return 1; } return 1; }
-
Posteaza comanda, cas chior.
-
Da comanda. EDIT: Partea cu codul din care rezulta textul ala cu acelasi nume.
-
Masina in functiune se respawneaza singura, any fix?
andy47 replied to .maSTER's question in Ajutor Scripting
La toate masinile patesti asa?