reply command
#1

Hello all it's reply command, it's chat between the admin and the member when the member do /report but it's not work good with me what can i do??
Код:
CMD:reply(playerid,params[])
{
   new string[128], id;
   if(PlayerInfo[playerid][AcceptedReport] >= 1 || PlayerInfo[playerid][Replys] >= 1)
   {
     if(sscanf(params,"ii",id)) return SendClientMessage(playerid, red, "USAGE:{FFFFFF} /reply [playerid]");
     format(string, sizeof(string), "%s replies: %s", id, params);
     SendClientMessage(playerid, yellow, string);
     format(string, sizeof(string), "Reply sent to %s: %s", id, params);
     SendClientMessage(playerid, yellow, string);
   }
   else return SendClientMessage(playerid, red, "ERROR: You don't have an active report or it still not accepted.");
   return 1;
}
thank you
Reply
#2

Your script is fucked up hahaha .. Let's try this !

pawn Код:
CMD:reply(playerid,params[])
{
   new string[128], message[128], id;
   if(PlayerInfo[playerid][AcceptedReport] >= 1 || PlayerInfo[playerid][Replys] >= 1) // ( || ) I guess those should be ( &&) I don't know
   {
     if(sscanf(params,"us",id, message)) return SendClientMessage(playerid, red, "USAGE:{FFFFFF} /reply [playerid] [message]");
     format(string, sizeof(string), "%s replies: %s", GetName(playerid), message);
     SendClientMessage(id, yellow, string);
     format(string, sizeof(string), "Reply sent to %s: %s", GetName(id), message);
     SendClientMessage(playerid, yellow, string);
   }
   else return SendClientMessage(playerid, red, "ERROR: You don't have an active report or it still not accepted.");
   return 1;
}
stock GetName(playerid)
{
    new
     pName[MAX_PLAYER_NAME];

    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
Also give me what do you mean by : PlayerInfo[playerid][AcceptedReport] and PlayerInfo[playerid][Replys]
Reply
#3

1st : thanks i will test it.
2nd : (||) or (&&) is available to use in the same place.
3rd : with PlayerInfo[playerid][AcceptedReport] and PlayerInfo[playerid][Replys] I mean if the player report is accepted and if he avalible to use /reply.
Reply
#4

pawn Код:
CMD:reply(playerid,params[])
{
   new string[128], message[128], id;
   if(PlayerInfo[playerid][AcceptedReport] >= 1 && PlayerInfo[playerid][Replys] >= 1)
   {
     if(sscanf(params,"us",id, message)) return SendClientMessage(playerid, red, "USAGE:{FFFFFF} /reply [playerid] [message]");
     format(string, sizeof(string), "%s replies: %s", GetName(playerid), message);
     SendClientMessage(id, yellow, string);
     format(string, sizeof(string), "Reply sent to %s: %s", GetName(id), message);
     SendClientMessage(playerid, yellow, string);
   }
   else return SendClientMessage(playerid, red, "ERROR: You don't have an active report or it still not accepted.");
   return 1;
}
stock GetName(playerid)
{
    new
     pName[MAX_PLAYER_NAME];

    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
That's how it should be then.
And ( || ) and ( && ) are totally different. || means OR ; && means AND .
Looking forward +rep
Reply
#5

it compile good i will test it right now with my friend
Reply
#6

Then +rep ...
Reply
#7

didn't work good when i type it, it give me that message : you dun have an active report.
Reply
#8

any way REP+ Golimad and thank you I will fix it with myself
Reply
#9

The problem isn't coming from that script then ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)