E1r2i3k4 0 Odesláno: 25. Listopad, 2013 Share Odesláno: 25. Listopad, 2013 Cawte všetci, mám problém v gamemode, konkrétne s pickupom. Dám to na server ale mi ho nezobrazí, Kód: new taxipic; public OnGameModeInit() { taxipic = CreatePickup(1274,1,2189.0688,1816.0016,10.8203); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == taxipic) { GameTextForPlayer(playerid,"~r~[ ! ] ~w~Ak sa chces stat taxikarom napis ~n~~g~/taxikar",5000, 4); return 1; } return 0; } Dík. Link to comment Share on other sites More sharing options...
0 XLS-City 0 Odesláno: 25. Listopad, 2013 Share Odesláno: 25. Listopad, 2013 Hod sem celý pickup i s tím povoláním taxikář Link to comment Share on other sites More sharing options...
0 Amenadiel 286 Odesláno: 25. Listopad, 2013 Share Odesláno: 25. Listopad, 2013 máš to v gamemode nebo v fs? Link to comment Share on other sites More sharing options...
0 E1r2i3k4 0 Odesláno: 25. Listopad, 2013 Author Share Odesláno: 25. Listopad, 2013 V gamemode, tu máš všetko čo sa týka zamestnania: new taxikar[MAX_PLAYERS]; new taxipic;public OnGameModeInit() { taxipic = CreatePickup(1274,1,2189.0688,1816.0016,10.8203); return 1; } public OnPlayerSpawn(playerid) { new cesta[100]; new meno[MAX_PLAYER_NAME]; GetPlayerName(playerid,meno, sizeof(meno)); format(cesta, sizeof(cesta), "%s.sav", meno); if(dini_Bool(cesta, "taxikar") == 1) { GivePlayerWeapon(playerid, dini_Int(cesta, "taxikarZBRAN2"), 500); GivePlayerWeapon(playerid, dini_Int(cesta, "taxikarZBRAN3"), 500); SetPlayerPos(playerid, dini_Float(cesta, "taxikarSPAWN1"), dini_Float(cesta, "taxikarSPAWN2"), dini_Float(cesta, "taxikarSPAWN3")); } else { SetPlayerPos(playerid,1675.248291, 1309.559326,10.820300); } return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == taxipic) { InfoBox(playerid,3,"~r~[ ! ] ~w~Ak sa chces stat taxikarom napis ~n~~g~/taxikar"); return 1; } return 0; } CMD:taxikar(playerid, params []) { if(IsPlayerInSphere(playerid, 2189.0688,1816.0016,10.8203, 5) == 1) { new cesta[100]; new meno[MAX_PLAYER_NAME]; GetPlayerName(playerid,meno, sizeof(meno)); format(cesta, sizeof(cesta), "%s.sav", meno); if(dini_Bool(cesta, "taxikar") == 1) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[ ! ] {FFFFFF}Už si taxikárom"); SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[ ! ] {FFFFFF}Stal si sa taxikárom"); GivePlayerWeapon(playerid, 4, 500); GivePlayerWeapon(playerid, 22, 500); GivePlayerWeapon(playerid, 5, 500); taxikar[playerid] = 1; dini_BoolSet(cesta, "taxikar", 1); dini_IntSet(cesta, "taxikarZBRAN2", 22); dini_IntSet(cesta, "taxikarZBRAN3", 5); dini_FloatSet(cesta, "taxikarSPAWN1", 2184.2537); dini_FloatSet(cesta, "taxikarSPAWN2", 1815.6729); dini_FloatSet(cesta, "taxikarSPAWN3", 10.8203); } else { SendClientMessage(playerid, 0xFF000FF, "{FF0000}[ ! ] {FFFFFF}Musíš byť pri zamestnaní TAXIKAR v LV"); } return 1; } CMD:vypoved(playerid, params []) { SendClientMessage(playerid, 0xFF000FF, "{FF0000}[ ! ] {FFFFFF}Dal si výpoveď zo zamestnania"); //TAXI========================================================= new cesta[100]; new meno[MAX_PLAYER_NAME]; GetPlayerName(playerid,meno, sizeof(meno)); format(cesta, sizeof(cesta), "%s.sav", meno); if(dini_Bool(cesta, "taxikar") == 1) { taxikar[playerid] = 0; dini_BoolSet(cesta, "taxikar", 0); dini_IntSet(cesta, "taxikarZBRAN1", 0); dini_IntSet(cesta, "taxikarZBRAN2", 0); dini_IntSet(cesta, "taxikarZBRAN3", 0); dini_FloatSet(cesta, "taxikarSPAWN1", 1675.2483); dini_FloatSet(cesta, "taxikarSPAWN2", 1309.5593); dini_FloatSet(cesta, "taxikarSPAWN3", 10.8203); } return 1; } Myslím že všetko už som napísal Link to comment Share on other sites More sharing options...
0 Tanga 131 Odesláno: 25. Listopad, 2013 Share Odesláno: 25. Listopad, 2013 IsPlayerInSphere??WTF?!Použi IsPlayerInRangeOfPoint.Ďalej ak budú hráči 5 na serveri a furt budú dávať /taxikar na tom mieste tak ti lagnú server.A ešte, pri tom pickupe musíš zadať myslím aj virtual world na konci, pozri si wiki.Ďalšia chyba je, že aj ked si taxikar, môžeš opäť použiť /taxikar. Link to comment Share on other sites More sharing options...
0 ATomas 291 Odesláno: 25. Listopad, 2013 Share Odesláno: 25. Listopad, 2013 Budu predpokladat ze tim nezobrazi myslis ze se pickup nezobrazi (koneckoncu tak sj ito napsal). Pokud CreatePickupz nezadas virtual world je defaultne 0. Takze se ujisti jestli jsi ve virtualu 0 nebo nastav pickupu -1 timpadem se bude zobrazovat ve vsechn VW. Použi IsPlayerInRangeOfPoint. Treba to mas pres define, to pak uz je jedno co si tam pise. Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 25. Listopad, 2013 Share Odesláno: 25. Listopad, 2013 Ešte je tu možnosť že sa mu kód zastaví pred tým, než sa dostane k pickupu. (Proste sa ti ta funkcia CreatePickup nevyvolá pretože sa nedokončí public OnGameModeInit) Môže to byť spôsobené nesprávnym returnom. Odporúčam si to skontrolovať (za CreatePickup daj print("Ok funguje"); a pozri sa či to vypísalo.) Link to comment Share on other sites More sharing options...
0 E1r2i3k4 0 Odesláno: 26. Listopad, 2013 Author Share Odesláno: 26. Listopad, 2013 Skúsil som print, ale nič mi nevypísalo. Ale ako s tým returnom ? mám tam dať namiesto return 1; return 0; ? Idem skusiť Skusil som to ale neide to Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 26. Listopad, 2013 Share Odesláno: 26. Listopad, 2013 Hmm, na konci nechaj return 1; máš v OnGameModeInit nejaký cyklus ? viem že to ukončí kód keď sa použije neexistujúca premenná... Pre objasnenie : new premenna[10]; // vytvorím premennu s polom 10 premenna[10] = 1; // zapíšem do neexistujúcej premennej (pretože som vytvoril len od 0-9) print("..."); // toto sa už nevykoná Link to comment Share on other sites More sharing options...
0 E1r2i3k4 0 Odesláno: 26. Listopad, 2013 Author Share Odesláno: 26. Listopad, 2013 Mal som tam timery, dal som ich prec a uz to ide Konecne to funguje dík vsetkym Link to comment Share on other sites More sharing options...
0 rhsCZ 19 Odesláno: 26. Listopad, 2013 Share Odesláno: 26. Listopad, 2013 máš to v gamemode nebo v fs? blbější otázka by nebyla? hele jako když jasně napíše že má poblem s gamemodem tak to už mluví samo o sobě Link to comment Share on other sites More sharing options...
Dotaz
E1r2i3k4 0
Cawte všetci, mám problém v gamemode, konkrétne s pickupom. Dám to na server ale mi ho nezobrazí, Kód:
new taxipic;
taxipic = CreatePickup(1274,1,2189.0688,1816.0016,10.8203);
return 1;
}
Link to comment
Share on other sites
10 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now