Forum

> > CS2D > Scripts > Scenario shift position?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Scenario shift position?

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Scenario shift position?

Devil-Thanh
GAME BANNED Off Offline

Zitieren
i'm Vietnamese too. contact me by emailing: - E-Mail Adresse (nur mit Login sichtbar) - or - E-Mail Adresse (nur mit Login sichtbar) -

And i'll help you.

alt Re: Scenario shift position?

Dynamite07
User Off Offline

Zitieren
what? this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("use","use1")
function use1(id,x,y)
if x == X and y == Y then
menu(id,"Ship,Ride boat|$25")
addhook("menu","menu1")
function menu1(id,title,button)
     if tittle == "Ship" then
     if button == 1 then
         --parse("setpos X Y") ?--
          parse("setmoney "..id.." "..player(id,"health")-25)
          msg2(id,"You successfully rode the boat for $25!")
     end
     end
end
end
end
didnt tested, idk if is what you want.

alt Re: Scenario shift position?

Rainoth
Moderator Off Offline

Zitieren
Write in Pixels where you want your player to appear. If you don't know pixels then go to Map editor and look up the tile you want player to appear, then multiply it by 32 and you'll have your pos or you can just divide by 32 and not bother to count..

alt Re: Scenario shift position?

Conscience
User Off Offline

Zitieren
@user Dynamite07: Your code would not work, keep learning. Also you did not check if the player has enough money or not.

Here:
Code >


@user Rainoth: tile*32+16 will give you the position of the tile in pixels. The +16 is just to make sure you are in the middle of the tile instead of the top left corner.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht