Invouk 91 Odesláno: 9. Říjen, 2014 Share Odesláno: 9. Říjen, 2014 Dobrý den mam taky menší problem a to ten že ked dam property create .. na pozicu tam a cenu taku tak sa nevytvorí 3dTextLabel #include <a_samp> #include <zcmd> #include <sscanf> #include <dini> #define MAX_PROPERTY 50 #define COLOR_FORPROPERTY 0xFF3333 enum prInfo { ProPosX, ProPosY, ProPosZ, ProCen } new nemovitostC = 0; new property[MAX_PROPERTY][prInfo]; forward CreateProperty(PosX,PosY,PosZ,Cen); public CreateProperty(PosX,PosY,PosZ,Cen) { if(nemovitostC < MAX_PROPERTY) { property[nemovitostC++][ProPosX] = PosX; property[nemovitostC][ProPosY] = PosY; property[nemovitostC][ProPosZ] = PosZ; property[nemovitostC][ProCen] = Cen; new pstring[128]; format(pstring,sizeof(pstring),"[Nemovitost]\nMajitel: Mesto\nCena: %d",Cen); Create3DTextLabel(pstring, 0xFF3333, PosX,PosY,PosZ, 40.0, 0, 0); } return 1; } public OnFilterScriptInit() { CreateProperty(142.5315,-70.1636,1.4297,10000); return 1; } CMD:money(playerid,params[]) { GivePlayerMoney(playerid,10000); SendClientMessage(playerid,COLOR_FORPROPERTY, "Dal si si 10000 $"); return 1; } Link to comment Share on other sites More sharing options...
0 eXot 18 Odesláno: 9. Říjen, 2014 Share Odesláno: 9. Říjen, 2014 Pridaj si printy Link to comment Share on other sites More sharing options...
0 Invouk 91 Odesláno: 9. Říjen, 2014 Author Share Odesláno: 9. Říjen, 2014 Hmm .. a prečo ? Link to comment Share on other sites More sharing options...
0 eXot 18 Odesláno: 9. Říjen, 2014 Share Odesláno: 9. Říjen, 2014 Skús prísť na to sám printf(" X %i " ,property[nemovitostC++][ProPosX]); printf(" Y %i " ,property[nemovitostC][ProPosY]); printf(" Z %i " ,property[nemovitostC][ProPosZ]); printf(" Cena %i " ,property[nemovitostC][ProCen]); EDIT:Nebudem ťa trápiť .. toto property[nemovitostC++][ProPosX] = PosX; prepíš na toto " property[nemovitostC][ProPosX] = PosX; a pod Create label daj " nemovitostC ++; Link to comment Share on other sites More sharing options...
0 Invouk 91 Odesláno: 9. Říjen, 2014 Author Share Odesláno: 9. Říjen, 2014 Jej ja som sa asi preklikol DIky ale mam tu ešte jeden problem:ERRORY: D:\Documents and Settings\12XpresS12\Plocha\GTA-Sa-Mp\Server HighLive\Pawno\Property.pwn(23) : error 025: function heading differs from prototype D:\Documents and Settings\12XpresS12\Plocha\GTA-Sa-Mp\Server HighLive\Pawno\Property.pwn(43) : warning 213: tag mismatch D:\Documents and Settings\12XpresS12\Plocha\GTA-Sa-Mp\Server HighLive\Pawno\Property.pwn(43) : warning 213: tag mismatch D:\Documents and Settings\12XpresS12\Plocha\GTA-Sa-Mp\Server HighLive\Pawno\Property.pwn(43) : warning 213: tag mismatch D:\Documents and Settings\12XpresS12\Plocha\GTA-Sa-Mp\Server HighLive\Pawno\Property.pwn(43) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error. Code: #include <a_samp> #include <zcmd> #include <sscanf> #include <dini> #define MAX_PROPERTY 50 #define COLOR_FORPROPERTY 0xFF3333 enum prInfo { ProPosX, ProPosY, ProPosZ, ProCen, ProCis } new nemovitostC = 0; new property[MAX_PROPERTY][prInfo]; forward CreateProperty(PosX,PosY,PosZ,Cen); public CreateProperty(Cis,PosX,PosY,PosZ,Cen) { if(nemovitostC < MAX_PROPERTY) { property[nemovitostC][ProPosX] = PosX; property[nemovitostC][ProPosY] = PosY; property[nemovitostC][ProPosZ] = PosZ; property[nemovitostC][ProCen] = Cen; property[nemovitostC][ProCis] = Cis; new pstring[128]; format(pstring,sizeof(pstring),"[Nemovitost]\nMajitel: Mesto\nCena: %d",Cen); Create3DTextLabel(pstring, 0xFF3333, PosX,PosY,PosZ, 40.0, 0, 0); new cesta[54]; format(cesta, sizeof(cesta), "/Property/%d.sav", Cis); dini_IntSet(cesta,"Cislo",Cis); } return 1; } public OnFilterScriptInit() { CreateProperty(1,142.5315,-70.1636,1.4297,10000); return 1; } CMD:money(playerid,params[]) { GivePlayerMoney(playerid,10000); SendClientMessage(playerid,COLOR_FORPROPERTY, "Dal si si 10000 $"); return 1; } Link to comment Share on other sites More sharing options...
0 milous22 14 Odesláno: 9. Říjen, 2014 Share Odesláno: 9. Říjen, 2014 riadok 23: rozdielne argumenty pri forwarde a v samotnej funkciiriadok 43: vo funkcii máš argumenty ako integer, ale v OnFilterScriptInit zadávaš floaty (a rovnako aj v Create3DTextLabel)a ten 3DTextLabel... odprintuj si parametre a uisti sa že si naozaj na tej pozícii (napr. SetPlayerPos) PS: nesedia ti čísla riadkov zo skriptom ktorý si nám ukázal.. tak ich nabudúce aspoň označ, že ktoré sú to Link to comment Share on other sites More sharing options...
Dotaz
Invouk 91
Dobrý den mam taky menší problem a to ten že ked dam property create .. na pozicu tam a cenu taku tak sa nevytvorí 3dTextLabel
Link to comment
Share on other sites
5 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