/ask and /ans
#1

hey there ,

i did my /ask and /ans system , /ask is for players to ask any question and /ans is for admins to answer the players questions , but i am kinda confused because when i do /ask no message appears for the admins so if anyone can show me a fine script for these both with dcmd so i can compare what errors i have done and this will help me for more commands in the future.
Reply
#2

What admin script are you using?
Reply
#3

i'm using dcmd , i purely made them.
Reply
#4

I would say something like this then:
but I recommend you to use sscanf by ****** (https://sampforum.blast.hk/showthread.php?tid=120356)

pawn Код:
dcmd_ask(blabla...
{
new question[128], string[256], PlayerName[MAX_PLAYER_NAME];
if (sscanf(params, "s[128]", question)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /ask <question> ");
GetPlayerName(playerid, PlayerName, sizeof PlayerName);
format(string, sizeof string, "[QUESTION]\"%s(%i)\": %s", PlayerName, playerid, question);
for(new i; i<MAX_PLAYERS; i++)
{
       if(IsPlayerAdmin(i)) //Change this to what you use to mark an admin in your code
       {
               SendClientMessage(i, 0x00FF00, string);
       }
}
return 1;
}
Something like this?
NOTE: only works if you have sscanf
Reply
#5

Thanks buddy , +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)