Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (NnamueN, Akow, 1 invisible), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
checking the ent morph #380950
08/23/11 04:21
08/23/11 04:21
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi,

a simple question:

how to check if a model is a specific mdl ?
tried
Quote:
if (ent_morph(me,"pfcube.mdl")){blabla}

and
Quote:
if (me=pfcube.mdl){blabla}

and some others in the same style, with quote, without quote, but it dont work
thanks

ps: havent find solution for my last problem but can do without solution so np..

Re: checking the ent morph [Re: ayks] #380954
08/23/11 07:28
08/23/11 07:28
Joined: May 2010
Posts: 117
Germany , Dortmund
B
Bone Offline
Member
Bone  Offline
Member
B

Joined: May 2010
Posts: 117
Germany , Dortmund
Code:
if(str_cmpi(str_for_entfile (NULL, ENTITY* ent), "xyz.mdl"){
// if ENTITY* ent is xyz.mdl , do something
}



Do you want this?

Re: checking the ent morph [Re: Bone] #381004
08/23/11 12:38
08/23/11 12:38
Joined: Aug 2011
Posts: 1
-
L
loosifer Offline
Guest
loosifer  Offline
Guest
L

Joined: Aug 2011
Posts: 1
-
Wow...That good. Thanks for sharing.

Re: checking the ent morph [Re: Bone] #381051
08/23/11 16:59
08/23/11 16:59
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
Thanks Bone, but a little (too) complicated (for me), i never declare ENTITY (only work with .mdl in wed) so im not sure it can work but i think i will use it in an other way.

if it work for loosifer its fine.

Re: checking the ent morph [Re: ayks] #381055
08/23/11 17:17
08/23/11 17:17
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Please read the manual and do the workshop. wink
Because it also works with the "me" pointer...:

if(str_cmpi(str_for_entfile(NULL, me), "xyz.mdl")
{
...do something
}


no science involved
Re: checking the ent morph [Re: fogman] #381059
08/23/11 17:39
08/23/11 17:39
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
thanks for saying it nicely, i guess u often have to say that.

i checked in the manual (before your message) but im hopeless.. (guess i read bad) without your "me" instead of the "entity*ent" i would have try something with basic variable..

tried
entity*me
entity*"name of object in wed"*

but better not comment it..

anyway it works with only "me"
thanks again

Last edited by ayks; 08/23/11 17:40.
Re: checking the ent morph [Re: ayks] #381065
08/23/11 19:09
08/23/11 19:09
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
No prob, you´re welcome. laugh


no science involved
Re: checking the ent morph [Re: fogman] #381066
08/23/11 19:28
08/23/11 19:28
Joined: May 2010
Posts: 117
Germany , Dortmund
B
Bone Offline
Member
Bone  Offline
Member
B

Joined: May 2010
Posts: 117
Germany , Dortmund


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1