Blaskowski Posted May 8, 2015 Author Posted May 8, 2015 Poti sa imi faci o comanda de genul [/givedeaglearea] // sa imi dea o arma deagle pe o distanta anume. Mersi. Te ajut cand am timp.
NewBie. Posted May 9, 2015 Posted May 9, 2015 Ok CMD:givedeaglearea(playerid, params[]) { new range, gunid; if(sscanf(params, "i", range)) return SendClientMessage(playerid, -1,"Syntax: /givedeaglearea [range]"); if(playerVariables[playerid][pAdminLevel] >= 1) // faci dupa variabilile tale { for(new t,g=GetMaxPlayers(); t < g; t ++) { format(szMessage, sizeof(szMessage), "Ai primit un deagle de la admin."); SCM(t, COLOR_WHITE, szMessage); foreach(Player, i) { if(ProxDetectorS(range, playerid, i)) { GivePlayerWeapon(i, 24, 999); } } } } return 1; } Jooos de tot pui: public ProxDetectorS(Float:radi, playerid, targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { 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); //radi = 2.0; //Trigger Radius GetPlayerPos(targetid, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } 1
Blawz0r. Posted May 9, 2015 Posted May 9, 2015 CMD:givedeaglearea(playerid, params[]) { new range, gunid; if(sscanf(params, "i", range)) return SendClientMessage(playerid, -1,"Syntax: /givedeaglearea [range]"); if(playerVariables[playerid][pAdminLevel] >= 1) // faci dupa variabilile tale { for(new t,g=GetMaxPlayers(); t < g; t ++) { format(szMessage, sizeof(szMessage), "Ai primit un deagle de la admin."); SCM(t, COLOR_WHITE, szMessage); foreach(Player, i) { if(ProxDetectorS(range, playerid, i)) { GivePlayerWeapon(i, 24, 999); } } } } return 1; } Jooos de tot pui: public ProxDetectorS(Float:radi, playerid, targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { 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); //radi = 2.0; //Trigger Radius GetPlayerPos(targetid, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } Mersi :D
Blaskowski Posted May 13, 2015 Author Posted May 13, 2015 @, mda, macar l-ai ajutat.....eu am avut probl. cu pc-ul si nu am mai avut timp sa ma uit pe aici / sa mai ajut...etc De maine incep iar sa ajut, puteti face cereri de ajutor.... Vineri: SUNT OCUPAT, ADICA SE DESCHIDE AL 3-A SV. DE BUGGED SI NU AM TIMP SA VA AJUT, DOAR VINERI IN REST BAGATI AICI :) 1
valentin1231 Posted May 23, 2015 Posted May 23, 2015 if(CarData[vid-PreVehicle][cOwned] == 0 && CarData[vid-PreVehicle][cModel] != 0 && PlayerData[playerid][pAdmin] < 6) { GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective); SendClientMessage(playerid, COLOR_GREY, "Server: Nu ai cheile la acest vehicul{00D9FF} [/v buy]"); return 1; } if(Valoarea < 302 && CarData[vid-PreVehicle][cOwned] == 1) { return 1; } Crezi ca ma poti ajuta sa o fac sa mearga? Atunci cand intru intr-o masina creeata pentru dealer, ma pot misca cu ea! Trebuie sa ramana pe loc. MS!
Blaskowski Posted May 23, 2015 Author Posted May 23, 2015 @, in topic nu prea ajut pe nimeni[...], eu in acest topic doar va accept si va resping, deci te accept, adica iti accept cererea de ajutor dami add pe skype:" bogdan.gtamp 1
Vince Posted May 24, 2015 Posted May 24, 2015 Nume:VinceProblemă întâlnită:Vreau si eu sistemu care scade wanted, ca pe bugged daca se poate..Ce am încercat până acum:Am incercat sa-l fac eu dar nu reusesc..Codul sursa/Log/Altele:-
Blaskowski Posted May 24, 2015 Author Posted May 24, 2015 @, vreau sa-mi arati ce ai incercat, ai 48h sa postezi.
Hushhhh Posted May 24, 2015 Posted May 24, 2015 Nume: HusH.Problemă întâlnită: Am pus in pawn o comanda teleport, dar imi da aceasta eroare, ma rog aceste 2 erori: error 010: invalid function or declaration, aceste erori le intalnesc la compilere.Ce am încercat până acum: Nu stiu ce eroare e, sunt incepator.Codul sursa/Log/Altele:-
Blaskowski Posted May 24, 2015 Author Posted May 24, 2015 @@HusH., aaaa .... posteaza linia la care iei eroarea asta.
Hushhhh Posted May 25, 2015 Posted May 25, 2015 (edited) C:\Users\HP\Desktop\server sa-mp\gamemodes\AsW.pwn(530) : error 010: invalid function or declaration C:\Users\HP\Desktop\server sa-mp\gamemodes\AsW.pwn(534) : error 010: invalid function or declaration C:\Users\HP\Desktop\server sa-mp\gamemodes\AsW.pwn(538) : error 054: unmatched closing brace ("}") C:\Users\HP\Desktop\server sa-mp\gamemodes/AsW.pwn(539) : error 010: invalid function or declaration if (strcmp("/mycommand", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 298,1520.2775,-1664.7058); SendClientMessage (playerid, COLOR_red , "Ai fost teleportat in Los Santos!"); return 1; } } return 0; } Iar asta-i comanda! Edited May 25, 2015 by HusH.
NewBie. Posted May 25, 2015 Posted May 25, 2015 (edited) C:\Users\HP\Desktop\server sa-mp\gamemodes\AsW.pwn(530) : error 010: invalid function or declaration C:\Users\HP\Desktop\server sa-mp\gamemodes\AsW.pwn(534) : error 010: invalid function or declaration C:\Users\HP\Desktop\server sa-mp\gamemodes\AsW.pwn(538) : error 054: unmatched closing brace ("}") C:\Users\HP\Desktop\server sa-mp\gamemodes/AsW.pwn(539) : error 010: invalid function or declaration if (strcmp("/mycommand", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 298,1520.2775,-1664.7058); SendClientMessage (playerid, COLOR_red , "Ai fost teleportat in Los Santos!"); return 1; } } return 0; } Iar asta-i comanda! tu ai greșit la linia if (strcmp("/mycommand", cmdtext, true, 10) == 0) trebuie să pui if(strcmp(cmd, "/mycommand", true) == 0) ]n fine, lasă strcmp, e învechit, fă pe ZCMD, e mult mai ușor ca strcmp (cauți pe google, zcmd samp sau vezi tu, oricum găsești) : sub #include <a_samp> (e sus de tot) pui #include <zcmd> CMD:mycommand(playerid, params[]) { if(IsPlayerConnected(playerid)) // daca jucator e conectat poate folosi comanda { SetPlayerPos(playerid, 298,1520.2775,-1664.7058); // seteaza pozitia SendClientMessage(playerid, COLOR_red, "Ai fost teleportat in Los Santos!"); // ii afiseaza mesajul } return 1; } Edited May 25, 2015 by AlexC
Hushhhh Posted May 25, 2015 Posted May 25, 2015 (edited) tu ai greșit la linia if (strcmp("/mycommand", cmdtext, true, 10) == 0) trebuie să pui if(strcmp(cmd, "/mycommand", true) == 0) ]n fine, lasă strcmp, e învechit, fă pe ZCMD, e mult mai ușor ca strcmp (cauți pe google, zcmd samp sau vezi tu, oricum găsești) : sub #include <a_samp> (e sus de tot) pui #include <zcmd> CMD:mycommand(playerid, params[]) { if(IsPlayerConnected(playerid)) // daca jucator e conectat poate folosi comanda { SetPlayerPos(playerid, 298,1520.2775,-1664.7058); // seteaza pozitia SendClientMessage(playerid, COLOR_red, "Ai fost teleportat in Los Santos!"); // ii afiseaza mesajul } return 1; } (9) : fatal error 100: cannot read from file: "zcmd" Imi da eroarea asta. Edited May 25, 2015 by HusH.
DoK Posted May 25, 2015 Posted May 25, 2015 (9) : fatal error 100: cannot read from file: "zcmd" Imi da eroarea asta. Cauta pe google: "include zcmd download" si baga-l in serverul tau/pawno/include. Nu o sa-ti mai dea nici o eroare.
L0K3D. Posted May 25, 2015 Posted May 25, 2015 (9) : fatal error 100: cannot read from file: "zcmd" Imi da eroarea asta. Fa ce te-a zis Un4m3d + la includeuri adauga "include <zcmd>".
Blaskowski Posted May 26, 2015 Author Posted May 26, 2015 pfff....ce ati facut aici, chat liber vad :) Imi cer scuze ca nu am mai dat semne de viata pa'ici...dar inainte ma uitam 24/24 si nu era nicio cerere...cand nu ma uit...faceti 100 de pag.... Postati pe rand ce probl. aveti, trebuie sa ma uit iar....
a014697 Posted May 28, 2015 Posted May 28, 2015 @, Nume: RioluProblemă întâlnită: Nu știu cum să încep un gamemode basic mysqlCe am încercat până acum: Foarte multCodul sursa/Log/Altele: - Apreciez dacă-mi dai un gamemode basic mysql sau o sursă de unde m-aș putea inspira
Recommended Posts