K0hL Posted May 3, 2018 Report Share Posted May 3, 2018 cum pot face o comanda gen /wherebonus sa imi puna checkpoint la o anumita locatiie? (cu coordonatele mele) Quote Link to comment Share on other sites More sharing options...
0 iulik Posted May 3, 2018 Report Share Posted May 3, 2018 ai comanda ta (CMD:comanda playerid paramterii), pui eventual dacă ești pe s4urik/bigzone sau orice altceva variabila cu isplayerconnected sau logged, asta doar ca să nu fie o problemă, pui lafel de frumos isplayerinrangeofpoint(playerid, coordonate1, 2, 3); și mai pui un sendclientmessage dacă nu în zona aproape de tine, ca să îi dea un scm că nu e aproape și să pui un SetPlayerCheckpoint(playerid, coordonate,mărime), cam atât ai de făcut. Quote Link to comment Share on other sites More sharing options...
0 Makena Posted May 3, 2018 Report Share Posted May 3, 2018 CMD:wherebonus(playerid, params[]) { if(!IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti la locatia potrivita. Ti-am pus in checkpoint pe harta."); SetPlayerCheckpoint(playerid, x, y, z, 3.0); return 1; } Quote Link to comment Share on other sites More sharing options...
0 ASGOOD Posted May 3, 2018 Report Share Posted May 3, 2018 //Daca nu ai definit CP[playerid] /* new CP[MAX_PLAYERS]; */ CMD:whereisbonus(playerid, params[]) { if(CP[playerid] != 0) return SendClientMessage(playerid, -1, "Ai deja un checkpoint activ."); SetPlayerCheckpoint(playerid, x, y, z, 5.0); CP[playerid] = 1; return 1; } CMD:wib(playerid, params[]) return cmd_whereisbonus(playerid, params); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(CP[playerid]) { case 1: { SendClientMessage(playerid, -1, "Ai ajuns la checkpoint."); DisablePlayerCheckpoint(playerid); } } return 1; } public OnPlayerConnect(playerid) { CP[playerid] = 0; return 1; } 1 Quote Link to comment Share on other sites More sharing options...
0 K0hL Posted May 3, 2018 Author Report Share Posted May 3, 2018 3 minutes ago, ASGOOD said: //Daca nu ai definit CP[playerid] /* new CP[MAX_PLAYERS]; */ CMD:whereisbonus(playerid, params[]) { if(CP[playerid] != 0) return SendClientMessage(playerid, -1, "Ai deja un checkpoint activ."); SetPlayerCheckpoint(playerid, x, y, z, 5.0); CP[playerid] = 1; return 1; } CMD:wib(playerid, params[]) return cmd_whereisbonus(playerid, params); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(CP[playerid]) { case 1: { SendClientMessage(playerid, -1, "Ai ajuns la checkpoint."); DisablePlayerCheckpoint(playerid); } } return 1; } public OnPlayerConnect(playerid) { CP[playerid] = 0; return 1; } ce face /wib, la ce ma ajuta ? Quote Link to comment Share on other sites More sharing options...
0 ASGOOD Posted May 3, 2018 Report Share Posted May 3, 2018 Just now, K0hL said: ce face /wib, la ce ma ajuta ? Prescurtare la comanda /whereisbonus, poti scrie si /whereisbonus, dar si /wib si se intampla acelasi lucru. Quote Link to comment Share on other sites More sharing options...
0 Lunoxx Posted May 3, 2018 Report Share Posted May 3, 2018 3 hours ago, ASGOOD said: //Daca nu ai definit CP[playerid] /* new CP[MAX_PLAYERS]; */ CMD:whereisbonus(playerid, params[]) { if(CP[playerid] != 0) return SendClientMessage(playerid, -1, "Ai deja un checkpoint activ."); SetPlayerCheckpoint(playerid, x, y, z, 5.0); CP[playerid] = 1; return 1; } CMD:wib(playerid, params[]) return cmd_whereisbonus(playerid, params); public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(CP[playerid]) { case 1: { SendClientMessage(playerid, -1, "Ai ajuns la checkpoint."); DisablePlayerCheckpoint(playerid); } } return 1; } public OnPlayerConnect(playerid) { CP[playerid] = 0; return 1; } OnDialogResponse? Verificarile alea le faci la OnPlayerEnterCheckpoint. Quote Servicii scripting calitative: https://www.sa-mp.ro/forums/topic/26143-l-ofer-servicii-scripting-de-calitate/ Contact: Skype: alin.m99 Discord: Lunoxx#1155 Email: [email protected] Facebook: facebook.com/pawnscripts Link to comment Share on other sites More sharing options...
0 ASGOOD Posted May 3, 2018 Report Share Posted May 3, 2018 1 hour ago, Lunoxx said: OnDialogResponse? Verificarile alea le faci la OnPlayerEnterCheckpoint. Ma scuzi, stiam, dar am scris gresit public-ul, csf Quote Link to comment Share on other sites More sharing options...
0 MiritaXD Posted May 4, 2018 Report Share Posted May 4, 2018 (edited) YCMD:wherebonus(playerid, params[], help) { new randomblablabal = random(3)+1; switch(randomblablabal) { case 1: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); case 2: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); case 3: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); case 4: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); } return true; } Edited May 4, 2018 by MiritaXD Quote Link to comment Share on other sites More sharing options...
0 Dennis12. Posted May 4, 2018 Report Share Posted May 4, 2018 Acum 6 ore, MiritaXD a spus: YCMD:wherebonus(playerid, params[], help) { new randomblablabal = random(3)+1; switch(randomblablabal) { case 1: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); case 2: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); case 3: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); case 4: SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); } return true; } Metode antice .. Quote Link to comment Share on other sites More sharing options...
0 valivaly96 Posted May 4, 2018 Report Share Posted May 4, 2018 Acum 3 ore, Dennis12. a spus: Metode antice .. Pune un exemplu de metode "moderne" mister Quote Link to comment Share on other sites More sharing options...
0 Dennis12. Posted May 4, 2018 Report Share Posted May 4, 2018 Acum 16 minute, valivaly96 a spus: Pune un exemplu de metode "moderne" mister Ia mister new Float: WhereBonusPos[4][3] = { {934.1129,-1393.1243,12.9426}, {915.2028,-1418.5118,12.9239}, {914.7075,-1476.2834,13.0913}, {915.0554,-1561.2878,13.0826}}; CMD:wherebonus(playerid,params[]) { new randwhere = random(sizeof(WhereBonusPos)); SetPlayerCheckpoint(playerid, WhereBonusPos[randwhere][0],WhereBonusPos[randwhere][1],WhereBonusPos[randwhere][2], 5.0); return 1; } Eu as vedea codu' asta mai ok decat ala .. Quote Link to comment Share on other sites More sharing options...
0 K0hL Posted May 4, 2018 Author Report Share Posted May 4, 2018 t/c, nu am inteles nimic, vreau decat sa dai o comanda si sa iti puna checkpoint, ms Quote Link to comment Share on other sites More sharing options...
0 ASGOOD Posted May 4, 2018 Report Share Posted May 4, 2018 17 minutes ago, K0hL said: t/c, nu am inteles nimic, vreau decat sa dai o comanda si sa iti puna checkpoint, ms SetPlayerCheckpoint(playerid, x, y, z, 5.0); Quote Link to comment Share on other sites More sharing options...
0 valivaly96 Posted May 4, 2018 Report Share Posted May 4, 2018 Acum 5 ore, K0hL a spus: t/c, nu am inteles nimic, vreau decat sa dai o comanda si sa iti puna checkpoint, ms cmd:numecomanda(playerid,params[]) { SetPlayerCheckpoint(x,y,z,raza);//x,y,z le iei cu /save din joc sau map editor return 1; } Quote Link to comment Share on other sites More sharing options...
0 K0hL Posted May 5, 2018 Author Report Share Posted May 5, 2018 16 hours ago, valivaly96 said: cmd:numecomanda(playerid,params[]) { SetPlayerCheckpoint(x,y,z,raza);//x,y,z le iei cu /save din joc sau map editor return 1; } si cum fac cand intra in el sa il dezactivezE? Quote Link to comment Share on other sites More sharing options...
0 cristiviteza Posted May 5, 2018 Report Share Posted May 5, 2018 2 hours ago, K0hL said: si cum fac cand intra in el sa il dezactivezE? La onplayerentercheckpoint folosesti disableplayercheckpoint(playerid); Quote Link to comment Share on other sites More sharing options...
0 valivaly96 Posted May 5, 2018 Report Share Posted May 5, 2018 (edited) Acum 9 ore, K0hL a spus: si cum fac cand intra in el sa il dezactivezE? cmd:numecomanda(playerid,params[]) { SetPlayerCheckpoint(x,y,z,raza);//x,y,z le iei cu /save din joc sau map editor CP[playerid]=12345;//daca nu ai definita variabila CP o definesti asa dupa includeuri: new CP[MAX_PLAYERS] //Variabila cp o folosim ca sa verificam la callbaclul onplayerentercheckpoint daca acest checpoint este activ return 1; } La onplayerentercheckpoint faci asa if(CP[playerid]==12345) { DisablePlayerCheckpoint(playerid); CP[playerid]=0; } Edited May 5, 2018 by valivaly96 Quote Link to comment Share on other sites More sharing options...
Question
K0hL
cum pot face o comanda gen /wherebonus sa imi puna checkpoint la o anumita locatiie? (cu coordonatele mele)
Link to comment
Share on other sites
17 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.