Код HTML:
Text: "format(eString, 2000, "{FFFF1A}You have given %s a positvive like point: %s!", PlayerName(Player), playerid, SReason);"
Код HTML:
Command:
CMD:like(playerid, params[])
{
new Player, rsp[10], SReason[256]; eString[0] = EOS;
//--------------------------------------------------------------------------
if(sscanf(params, "uis[256]", Player, rsp, SReason)) return
SendUsage(playerid, "/like [ID/Name] [1/-1] [Message]");
//--------------------------------------------------------------------------
else if(!IsPlayerConnected(Player)) return
SendClientMessage(playerid, COLOR_ULTRARED, "{08FF00}Player not connected");
//--------------------------------------------------------------------------
else if(Player == playerid) return
SendClientMessage(playerid, COLOR_ULTRARED, "{08FF00}You cannot give yourself Like/Dislike!");
//--------------------------------------------------------------------------
else if((gettime() - rldtime[playerid]) < 180) return
SendClientMessage(playerid, COLOR_ULTRARED, "{08FF00}Sorry, but you can give a point of like/dislike only once in an 3 minutes!");
//--------------------------------------------------------------------------
else
{
//----------------------------------------------------------------------
if(strcmp(rsp, "1", false) == 0)
{
CosminInfo[Player][Like] += 1;
format(eString, 1000, "{FFFF1A}You have recieved a positive like point from %s: %s!",PlayerName(playerid), playerid, SReason);
SendClientMessage(Player, COLOR_YELLOW, eString);
format(eString, 2000, "{FFFF1A}You have given %s a positvive like point: %s!", PlayerName(Player), playerid, SReason);
SendClientMessage(playerid, COLOR_YELLOW, eString);
rldtime[playerid] = gettime();
}
//----------------------------------------------------------------------
else if(strcmp(rsp, "-1", false) == 0)
{
CosminInfo[Player][Dislike] += 1;
format(eString, 1000, "{FFFF1A}You have recieved a negative like point from %s: %s!",PlayerName(playerid), playerid, SReason);
SendClientMessage(Player, COLOR_YELLOW, eString);
format(eString, 1000, "{FFFF1A}You have given %s a negative like point: %s", PlayerName(Player), playerid, SReason);
SendClientMessage(playerid, COLOR_YELLOW, eString);
rldtime[playerid] = gettime();
}
//----------------------------------------------------------------------
}
return 1;
}