[HELP] DCMD not showing in-game - 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] DCMD not showing in-game (
/showthread.php?tid=85350)
[HELP] DCMD not showing in-game -
Haegon - 07.07.2009
Well, I write my code, follow the wiki.sa-mp.com tutorials, and compile with no issues.
When I get in-game, and type a command, nothing shows up.
I've been toying with it for about an hour with no avail.
Here is my code:
http://pastebin.com/m39644dd0
Any suggestions would be awesome.
Thanks, all.
Re: [HELP] DCMD not showing in-game -
happyface - 07.07.2009
hello there, i am not sure what, "if (strlen(params))", is supposed to do, but im not that familar with this style command.
params[] = "is the string entered after the command" (
https://sampwiki.blast.hk/wiki/Fast_Commands)
so you only need this if you have a command that either use id like, "/heal 4", or whatever.
pawn Код:
dcmd_kill(playerid, params[])
{
#pragma unused params
if (IsPlayerConnected(playerid))
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, 0x008040FF, "You have killed yourself.");
}
return 1;
}
pawn Код:
dcmd_help(playerid, params[])
{
#pragma unused params
if (IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0x008040FF,"ACCOUNT: /rules,");
SendClientMessage(playerid, 0x008040FF,"JOBS: /merchelp, /lawyerhelp, /armshelp, /drughelp, /wheelhelp");
SendClientMessage(playerid, 0x008040FF,"HOUSES:");
SendClientMessage(playerid, 0x008040FF,"CHAT: (/w)hisper, (/o)oc, (/s)hout, (/c)lose, (/l)ocal, (/b), (/ad)vertise, (/f)amily");
SendClientMessage(playerid, 0x008040FF,"CHAT: /me, /togooc, /tognews, /togfam, /togwhisper");
SendClientMessage(playerid, 0x008040FF,"BANK: /balance, /withdraw, /deposit, /transfer");
}
return 1;
}
pawn Код:
dcmd_rules(playerid, params[])
{
#pragma unused params
if (IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0x008040FF,"*** OUR RULES ***");
SendClientMessage(playerid, 0x008040FF,"1) Always roleplay. Use /b to talk out of character.");
SendClientMessage(playerid, 0x008040FF,"2) Never DM (Deathmatch - Killing without a roleplay reason).");
SendClientMessage(playerid, 0x008040FF,"3) Show others respect, especially admins.");
SendClientMessage(playerid, 0x008040FF,"4) Absolutely DO NOT Hack/Cheat/Glitch/Exploit. You WILL be banned.");
SendClientMessage(playerid, 0x008040FF,"5) Any other questions/concerns - visit (to come)");
}
return 1;
}
Re: [HELP] DCMD not showing in-game -
refshal - 07.07.2009
http://pastebin.com/f4f24ded2
Re: [FIXED] DCMD not showing in-game -
Haegon - 07.07.2009
Fixed. Thanks guys.