SA-MP Forums Archive
Help please - 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: Help please (/showthread.php?tid=189345)



Help please - jackofbladesmah - 11.11.2010

hey guys im in need of help please

i need to create commands as /help and like those

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;

}

what i have to type on the // to and where i save it so i can use them ingame

and also please i need help on putting maps how do i active them ingame

im trying to make a gamemode for my server please


Re: Help please - Bessensap - 11.11.2010

Use the wiki and search the forums, we're not gonna learn you the basics before you havent considered searching, making a gamemode for a server isnt something u do in 5 minutes.


Re: Help please - HrvojeCro - 11.11.2010

pawn Код:
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, color, "HOUSE: /unlock /lock /rent /unrent");//command help
SendClientMessage(playerid, color, "CAR: /unlock /lock /rent /unrent");// etc.
}
return 1;
}
example for give player money command
pawn Код:
if (strcmp("/givememoney", cmdtext, true, 10) == 0)
{
GivePlayerMoney(playerid, 50000)
}
return 1;
}
EDIT:
Quote:
Originally Posted by Bessensap
Посмотреть сообщение
Use the wiki and search the forums, we're not gonna learn you the basics before you havent considered searching, making a gamemode for a server isnt something u do in 5 minutes.
I agree


Re: Help please - rs.pect - 11.11.2010

HrvojeCro, you can't return 1 in OnPlayerCommandText, especially in filterscripts. It may disallow to other filterscripts get commands.