[Help]Slap CMD
#9

Quote:
Originally Posted by SomebodyAndMe
Посмотреть сообщение
Oh lol sorry:
pawn Код:
COMMAND:slap(playerid,params[])
{
    new OtherPlayer, Msg[170], Name[24], Message[150], OtherPlayerName[24], Float:x, Float:y, Float:z;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]: You don't have access!");
    else if(sscanf(params, "rs[170]", OtherPlayer, Message)) return SendClientMessage(playerid,0xFFFFFFFF, "SYNTAX: /slap <name/id> <reason>");
    GetPlayerName(playerid, Name, sizeof(Name));
    GetPlayerName(OtherPlayer, OtherPlayerName, sizeof(OtherPlayerName));
    format(Msg, sizeof(Msg), "{FF6600}%s {FFFFFF}slaps {FF6600}%s {FFFFFF}because: {FF6600}%s", Name, OtherPlayerName, Message);
    SendClientMessageToAll(0xFFFFFFFF, Msg);
    GetPlayerPos(OtherPlayer, x, y, z);
    SetPlayerPos(OtherPlayer, x, y, z+5);

    return 1;
}
You might want to rewrite that code, as you're wasting bytes and memory.
128 characters is the max. limit of text that can be sent through the chat.
Reply


Messages In This Thread
[Help]Slap CMD - by xRandomGuy - 12.12.2011, 23:16
Re: [Help]Slap CMD - by Storm203 - 13.12.2011, 00:16
Re: [Help]Slap CMD - by [HiC]TheKiller - 13.12.2011, 00:57
Re: [Help]Slap CMD - by grand.Theft.Otto - 13.12.2011, 01:00
Re: [Help]Slap CMD - by xRandomGuy - 13.12.2011, 01:51
Re: [Help]Slap CMD - by SomebodyAndMe - 13.12.2011, 05:28
Re: [Help]Slap CMD - by suhrab_mujeeb - 13.12.2011, 07:13
Re: [Help]Slap CMD - by SomebodyAndMe - 13.12.2011, 07:34
Re: [Help]Slap CMD - by shitbird - 13.12.2011, 10:07
Re: [Help]Slap CMD - by grand.Theft.Otto - 13.12.2011, 14:24

Forum Jump:


Users browsing this thread: 1 Guest(s)