AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do u write a code that (https://forums.alliedmods.net/showthread.php?t=10505)

Crazywelder1 02-21-2005 12:56

How do u write a code that
 
ok how do u write a code that tells u if the player hasn't moved after a certain amount of time(wherever he is)...

i know it has set_tassk in it and register_event but i dont understand on u do it??

Your time will be greatly appreciated..

slurpycof 02-21-2005 13:10

http://forums.alliedmods.net/showthread.php?t=300

This is great plugin by CheesyPeteza and easy to read the code to see how to do it.
________
buy cheap vaporizer

Crazywelder1 02-21-2005 19:55

i ve read that and yet kinda understand maybe someone can explain it some what for example i have no clue wat i++ means does it mean add it(bad answer) ??
ty anyways but i need more detail

Sp4rt4n 02-21-2005 21:28

im kinda a scripting noob, but i think i++ is the value of i plus 1...

TotalNoobScripter 02-22-2005 09:08

bingo.

PM 02-22-2005 12:47

Quote:

Originally Posted by Sp4rt4n
im kinda a scripting noob, but i think i++ is the value of i plus 1...

i++ increments i by 1. The value of i++ itself is i though.

++i does the same, but its value is the incremented value.

BlueRaja 02-22-2005 21:54

Quote:

Originally Posted by PM
Quote:

Originally Posted by Sp4rt4n
im kinda a scripting noob, but i think i++ is the value of i plus 1...

i++ increments i by 1. The value of i++ itself is i though.

++i does the same, but its value is the incremented value.

Code:
//ex. new i = 6 new j j = i++ //i is 7, j is 6 j = i++ //i is 8, j is 7 j = ++i //i is 9, j is 9 j = ++i //i is 10, j is 10

TotalNoobScripter 02-23-2005 13:16

ah so thats the diff from ++i and i++ , *re-edits lots of his code*

BlueRaja 02-23-2005 17:01

It doesn't make a difference which you use, unless you specifically need the variable to be incremented before/after the expression is evaluated.

Crazywelder1 02-24-2005 20:17

sorry for not replying for a while but thank you all it helps alot!!! thank you again very aprreciated..


All times are GMT -4. The time now is 14:02.

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