[HELP] DCMD not showing in-game
#2

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;
}
Reply


Messages In This Thread
[HELP] DCMD not showing in-game - by Haegon - 07.07.2009, 07:20
Re: [HELP] DCMD not showing in-game - by happyface - 07.07.2009, 08:10
Re: [HELP] DCMD not showing in-game - by refshal - 07.07.2009, 08:13
Re: [FIXED] DCMD not showing in-game - by Haegon - 07.07.2009, 08:37

Forum Jump:


Users browsing this thread: 2 Guest(s)