Setting a var to an if loop?
#1

I have 2 banks, 1 in lv and 1 in ls... I'm using the same interior for both (easier) and to solve that players will meet from another bank I set the virtual world to 1 at the ls bank.
Now there is a problem ofcourse to exit the bank, 'Where should the player be spawned back to? ls or lv? I tried to fix this using a variable, and setting it to "lv" on the first if loop and to "ls" on the second if loop.
This doesn't seem to work

I'm Still kinda new at scripting, so please help me out in any way you can
Код:
Have noticed some peepz like to steel code here :p so DELETED
Need anything more?
Just let me know

Greetz Riz
Reply
#2

You can't give a variable a string value.

However, if you wrote:

#define ls 1
#define lv 2

It might work (I haven't examined it too closely)

Variable takes integer values (1,2,3....)

If you were to save a string, you'd need to declare it as a string (Variable[2]) and then use = "ls"

However, I suggest you use defines to represent values.

You also need to use welkebamk as an array so it works for all the players atonce. Here's a tidier version that may work (untested)

pawn Код:
Deleted as per user request.
Reply
#3

Well,

U can call it tested (with 1 player atm) and WORKING

I think I'm gonna read your post here a few times more, just to understand these new things I've learnd here
Thnx Weirdosport!

Grtz Riz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)