Change a command
#1

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?
Reply
#2

can anybody help me with a simple thing as this...

Question:Where can i edit my commands
Reply
#3

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
Reply
#4

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
Reply
#5

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
Reply
#6

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.
Reply
#7

You need compile and restart server, then try again it.
Reply
#8

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"
Reply
#9

haha thats ZCMD
Know what your using else the result of search will be false
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)