Tessék itt van amit Cannonn Készitett
#include a_samp
#include zcmd
#include dini
//----------------------------------------LIKE----------------------------------------//
new Text:likeok;
new likes;
new like[256];
new likeolt[MAX_PLAYERS];
new dislikeolt[MAX_PLAYERS];
//----------------------------------------LIKE----------------------------------------//
CMD:like(playerid)
{
if(likeolt[playerid] == 0) {
likes++;
likeolt[playerid] = 1;
dini_IntSet(\"Likeok.ini\", \"Likeok\", likes);
format(like,sizeof(like),\"Likeok: %d\",likes);
TextDrawSetString(likeok, like);
}else{
SendClientMessage(playerid,0x00ff11AA,\"Csatlakozásonként csak 1-szer likeolhatsz!\"); }
return 1;
}
//----------------------------------------DISLIKE----------------------------------------//
CMD:dislike(playerid)
{
if(dislikeolt[playerid] == 0) {
likes--;
dislikeolt[playerid] = 1;
dini_IntSet(\"Likeok.ini\", \"Likeok\", likes);
format(like,sizeof(like),\"Likeok: %d\",likes);
TextDrawSetString(likeok, like);
}else{
SendClientMessage(playerid,0x00ff11AA,\"Csak egyszer dislikeolhatsz!\"); }
return 1;
}
//----------------------------------------CSATLAKOZÁS----------------------------------------//
public OnPlayerConnect(playerid)
{
likeolt[playerid] = 0;
dislikeolt[playerid] = 0;
format(like,sizeof(like),\"Likeok: %d\",likes);
TextDrawShowForAll(likeok);
TextDrawSetString(likeok, like);
return 1;
}
//----------------------------------------FILTERSCRIPT----------------------------------------//
public OnFilterScriptInit()
{
format(like,sizeof(like),\"Likeok: %d\",likes);
if(fexist(\"Likeok.ini\")) {
likes = dini_Int(\"Likeok.ini\", \"Likeok\");
}else{
dini_Create(\"Likeok.ini\"); }
likeok = TextDrawCreate(408.000000, 6.000000, like);
TextDrawBackgroundColor(likeok, 255);
TextDrawFont(likeok, 2);
TextDrawLetterSize(likeok, 0.230000, 1.200000);
TextDrawColor(likeok, 16711935);
TextDrawSetOutline(likeok, 1);
TextDrawSetProportional(likeok, 1);
}