Forum

> > CS2D > Scripts > change map=change script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch change map=change script

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt change map=change script

tos12345678
User Off Offline

Zitieren
Hi, i need function to change script when change map
× TESTXD.map
× TESTXD.lua
Because other players easy edit my script in lua

alt Re: change map=change script

tos12345678
User Off Offline

Zitieren
Okey... EXAMPLE I...

Start zm.dust2.map = Start Specified my selected script. •

EXAMPLE II

When Play on (zm.dust2.map) = ON script : (zombiemod.lua) in sys/lua) us

alt Re: change map=change script

GeoB99
Moderator Off Offline

Zitieren
Pretty sure he means whenever the map is changing, the specific script will be changed too. You can just rename your map.lua file to the name of the map and put it in the maps folder. In another way, you can do with this simple code (that code it's not really mine though).
1
2
3
4
5
if ((string.len(map("name") > 2) and (string.substr(map("name"), 2) == "zp")) then
     dofile("ZombiePlague.lua")
else
     dofile("Default.lua") 
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht