/ame Filterscript or a ready code.
#4

Here's explanations of a simple /ame:
pawn Код:
COMMAND:ame(playerid, params[]) // ZCMD example, change if you're using another command processor
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "/ame [text]");
    // If the player didn't write anything, "return" to stop the command so his chat bubble isn't set
    // We're gonna "return SendClientMessage", which will return the value SendClientMessage returns
    // A bit confusing, but if SendClientMessage returns 1, the "return SendClientMessage" will do "return 1"
    // SendClientMessage returns 1 if the player is online, and 0 if the player is offline, but that doesn't matter
    // Basically we both use "return" to stop the command, and "SendClientMessage" to give the player a message "/ame [text]"

    SetPlayerChatBubble(playerid, params, color, Float:drawdistance, expiretime);
    // "playerid" - The chat bubble is gonna be attached to playerid (the player who used the command as you can see in the CMD parameters CMD:ame(playerid, ...) )
    // "params" - The text the player entered, as seen in the CMD parameters, we're gonna display this text above his head
    // Fill in the color, expiretime and drawdistance yourself with what you wish to use, explained on the wiki
   
    return 1;
    // Return 1, to let the server know the command was performed sucessfully
}
Reply


Messages In This Thread
/ame Filterscript or a ready code. - by AlterEGO - 29.03.2015, 20:55
Re: /ame Filterscript or a ready code. - by CalvinC - 29.03.2015, 21:08
Re: /ame Filterscript or a ready code. - by AlterEGO - 29.03.2015, 21:15
Re: /ame Filterscript or a ready code. - by CalvinC - 30.03.2015, 09:52

Forum Jump:


Users browsing this thread: 1 Guest(s)