Raised This Month: $ Target: $400
 0% 

loop command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kurai-Domi
Member
Join Date: Sep 2004
Old 09-17-2004 , 06:50   loop command
Reply With Quote #1

i want to repeat a command as long is recieve a specified value how can i do that?

i tried:

for(new i=1;i<300;i++)
{
if (ent_get_int(i,ENT_INT_modelindex) = 180)
{
client_print(id,print_center,"Did it!"
}
}

but it doesn't work plz help me
Kurai-Domi is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-17-2004 , 10:03  
Reply With Quote #2

try changing
Code:
client_print(id,print_center,"Did it!"
to
Code:
client_print(id,print_center,"Did it!")
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Kurai-Domi
Member
Join Date: Sep 2004
Old 09-19-2004 , 09:59  
Reply With Quote #3

thats not the prob i just made a mistake...
i can't build that in a
public name(id)
because it says in console "command not found"

i need to put it in a task, but i see many plugins that use that kind of command in a normal (id) thingy how can i do that too?
Kurai-Domi is offline
BillyTheKid
Senior Member
Join Date: Jun 2004
Old 09-22-2004 , 23:00  
Reply With Quote #4

Quote:
Originally Posted by Kurai-Domi
thats not the prob i just made a mistake...
i can't build that in a
public name(id)
because it says in console "command not found"

i need to put it in a task, but i see many plugins that use that kind of command in a normal (id) thingy how can i do that too?
I like while statements better!!!!!! I'm not a big for fan.

Try a while statement
__________________
Select * from * where *=*;
BillyTheKid is offline
Send a message via AIM to BillyTheKid
BAILOPAN
Join Date: Jan 2004
Old 09-22-2004 , 23:03  
Reply With Quote #5

You're looping between random entities.

You should first check if the entity is even valid before trying to extrapolate data from it.
__________________
egg
BAILOPAN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode