Change a command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Change a command (
/showthread.php?tid=177220)
Change a command -
FrankC - 16.09.2010
i got a gm base from here, its current command is /gdeposit and i want it changed to /deposit
ive been looking in the gm .pwn file but there is nothing where can i change it?
Re: Change a command -
FrankC - 16.09.2010
can anybody help me with a simple thing as this...
Question:Where can i edit my commands
Re: Change a command -
Th3Angel - 17.09.2010
Just look under "OnPlayerCommandText"
Example:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/example", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "Text Here");
return 1;
}
return 0;
}
To change the command, just simply change "/example" to "/" and whatever name you want it to be.
I would suggest to first learn the scripting language. Visit here:
https://sampwiki.blast.hk/wiki/Category:..._Documentation
Re: Change a command -
FrankC - 19.09.2010
Quote:
Originally Posted by Th3Angel
Just look under "OnPlayerCommandText"
Example:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/example", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "Text Here");
return 1;
}
return 0;
}
To change the command, just simply change "/example" to "/" and whatever name you want it to be.
I would suggest to first learn the scripting language. Visit here: https://sampwiki.blast.hk/wiki/Category:..._Documentation
|
Okay thanks.
but when i rename the /gdeposit to /deposit it shows /deposit in the help menu
but the command is still /gdeposit
Re: Change a command -
Mike_Peterson - 19.09.2010
Well first learn to use pawno.
www.wiki.sa-mp.com helps you alot with it
just press CTRL+F and search for "/gdeposit including the "
then edit it
Re: Change a command -
FrankC - 19.09.2010
Quote:
Originally Posted by Mike_Peterson
Well first learn to use pawno.
www.wiki.sa-mp.com helps you alot with it
just press CTRL+F and search for "/gdeposit including the "
then edit it
|
Hmm.. dont think you understand me

i did that i renamed all my /gdeposit but, when i type in /deposit it doesnt respond but when i type
/gdeposit and it do the command even though i did rename all /gdeposit to /deposit.
guess i just got a gay gm...
Yes.. i did rename all /gdeposit, and compiled and there was no errors.
Re: Change a command -
Typhome - 19.09.2010
You need compile and restart server, then try again it.
Re: Change a command -
FrankC - 19.09.2010
Never mind guys thanks for helping me.
The problem was that i had this weird code:
Код:
command(gdeposit, playerid, params[])
i renamed the gdeposit and it works now, couldn't find it because i was seaching "
/gdeposit"
Re: Change a command -
Mike_Peterson - 19.09.2010
haha thats ZCMD

Know what your using else the result of search will be false