Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include "../include/chat.inc"
- #define MESSAGE_COLOR 0xEEEEEEFF
- #define ECHO_COLOR 0xEEEEEEFF
- #define ACTION_COLOR 0x00CC00
- //------------------------------------------------
- public OnFilterScriptInit()
- {
- print("\n--New Chat Commands by scratch -By JonnyBoy-.\n");
- print("\n--Version 4.4-.\n");
- return 1;
- }
- //------------------------------------------------
- // Feel Free to use this but don't Remove (Made vy: JonnyBoy!)
- //------------------------------------------------
- // If you use this on your server please make a credit for me :)
- //*******-- THINGS YOU CAN AND CAN'T DO! --*******
- // You can't claim this as your own!
- // You can't Sell this or make money from it!
- // You can ONLY use it on the server!
- //------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256];
- new Message[256];
- new idx;
- new actiontext[MAX_CHATBUBBLE_LENGTH+1];
- cmd = strtok(cmdtext, idx);
- // Action command
- if(strcmp("/me", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"* %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,20.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/sa", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Server Admin] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,10.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/ad", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Admin] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,5.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/n", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Newbie] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,3.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/h", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Helper] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,3.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/race", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Race] Race at %s and win 2000$! /ra for [Race] Chat!",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,2.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/ra", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Race] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,2.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/s", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[STOP] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,4.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/rc", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[RP]Chat Commands Made by JonnyBoy",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,4.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/rp_cmd", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[HELP] To see all Commands look at Roleplay/Chat/index.html",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,4.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- //------------------------------------------------
- // NEW COMMANDS!! -
- //------------------------------------------------
- if(strcmp("/warn", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Warn] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,10.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/tip", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[TIP] %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,10.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- if(strcmp("/rek", cmd, true) == 0)
- {
- Message = strrest(cmdtext,idx);
- format(actiontext,MAX_CHATBUBBLE_LENGTH,"[Recruiting] We are now recruting members at %s",Message);
- SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,10.0,10000);
- SendClientMessage(playerid,ACTION_COLOR,actiontext);
- return 1;
- }
- return 0; // not handled by this script
- }
- //------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement