Where do I declare my gamemode? -
Coltmaster - 25.04.2013
I made a script, gamemode.pwn lets call it. What file do I write for the server to load it?
Re: Where do I declare my gamemode? -
[L]azy[H]aze - 25.04.2013
Well to run server.exe you need the .amx to run the gamemode. Is this what you asked?
Re: Where do I declare my gamemode? -
Coltmaster - 25.04.2013
I need the .amx? Alright so I compile to get that then.
But no, my question is: where do I write down the filename so the server knows to load it?
Re: Where do I declare my gamemode? -
[L]azy[H]aze - 25.04.2013
Oh you write it in the server.cfg for example
Код:
echo Executing Server Config...
lanmode 0
rcon_password rconpass
maxplayers 20
port 7777
hostname SA-MP 0.3 Server
gamemode0 Gamemodenamehere 1
filterscripts
announce 1
plugins
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Re: Where do I declare my gamemode? -
Coltmaster - 25.04.2013
Thanks, what does this mean by the way:
error 021: symbol already defined: "OnPlayerCommandText"
Re: Where do I declare my gamemode? -
[L]azy[H]aze - 25.04.2013
"OnPlayerCommandText" Is defined twice.
Re: Where do I declare my gamemode? -
Coltmaster - 25.04.2013
Um... what is the problem with that?
Also, how do I now start and test my server, locally?
Re: Where do I declare my gamemode? -
[L]azy[H]aze - 25.04.2013
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
You have this code 2 times if your making another command all you do is
when adding another command add it under public on play commandtext and it should do the trick so remove if you have more than 1

ublic on player command text
For example
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if (strcmp("/mycommand2", cmdtext, true, 10) == 0)
{
// Do something herefg
return 1;
}
return 0;
}
Re: Where do I declare my gamemode? -
Coltmaster - 25.04.2013
Yup I sorted that, but how do I test my server locally now?
Re: Where do I declare my gamemode? -
[L]azy[H]aze - 25.04.2013
Run the server.exe and go on sa-mp and add :7777 to your server list but make sure you have 7777 for port on the server cfg