arkadaşlar sonradan ayar зektim ayarı /graffiti ile vermiyorsunuz bir yere sıkmaya başlayın zaten o gelir otomatik ayar зekersiniz oluştura tıkarsınız menьden yerini ayarlarsınız oluşur. spray sıkmayı eklemeyi unutmuştum ekledim.herhangi bir yere spray sıkmaya başlayın 20 sn sonra sistem gelecektir. Bilenler zaten kurabilir bilmeyenler yardım almak iзin skype:freeplsn ekleyin. Bir teşekkьr yeterli yarın eşya sistemi yapıcam size.
pawn Код:
#include <a_mysql>
#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB "samp"
forward ConnectMySQL();
public ConnectMySQL()
{
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
if(mysql_ping() == 1)
{
mysql_debug(0);// SQL Log - 0: Off / 1: On
printf("[MySQL]: `%s` Veritabanina baglanti kuruldu..", SQL_DB);
}
else
{
printf("[MySQL-ERROR]: `%s` Veritabanina baglanti kurulamadi, Sunucu kapatiliyor..", SQL_DB);
SendRconCommand("exit");
return 0;
}
return 1;
}
forward DisconnectMySQL();
public DisconnectMySQL()
{
mysql_close();
return 1;
}
enum Graffiti
{
Grafid,
Sahip,
Float:aX,
Float:aY,
Float:aZ,
Float:bX,
Float:bY,
Float:bZ,
tur,
boyut1,
renk,
asicerik,
};
new MAX_STRING[256];
new Graffiti[MAX_GRAFFITI][grafid];
new asicerik[MAX_PLAYERS];
new boyut1[MAX_PLAYERS];
new Renk[MAX_PLAYERS];
new Tur[MAX_PLAYERS]
new graffiti;
new a[MAX_PLAYERS];
new b[MAX_PLAYERS];
new c[MAX_PLAYERS];
new d[MAX_PLAYERS];
new e[MAX_PLAYERS];
new f[MAX_PLAYERS];
//ogmi
CreateObject(19482,Graffiti[grafid][aX],Graffiti[grafid][aY],Graffiti[grafid][aZ]+0.5,0.0,0.0,0.0,0.0);
SetObjectMaterialText(graffiti,Graffiti[grafid][asicerik],0,Graffiti[grafid][boyut1],"Graffiti[grafid][tur]",24,1,Graffiti[grafid][renk],0,OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
if(response)
{
asicerik[playerid] == inputtext;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTьr(arial vs.)\nOluştur", "Tamam", "Devam");
}
if(dialogid == 3)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,5,DIALOG_STYLE_INPUT,"Graffiti","0xli renk kodu girin","Tamam","Зık");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Graffiti", "32x32\n64x32\n64x64\n128x32\n128x64\n128x128\n256x32\n256x64\n256x128\n256x256\n512x64\n512x128\n512x256\n512x512", "tamam", "devam");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Graffiti", "Verdana\nGeorgia\nComic Sans MS\nArial\nImpact", "tamam", "devam");
}
if(listitem == 3)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z)
SendClientMessage(playerid,-1,"Lьtfen graffitinizi dьzenleyin ve spray sıkmaya başlayın.");
CreateObject(19482,X,Y,Z+0.5,0.0,0.0,0.0,0.0);
SetObjectMaterialText(graffiti,asicerik[playerid],0,boyut1[playerid],"Tur[playerid]",24,1,Renk[playerid],0,OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
EditObject(playerid,graffi);
}
}
if(dialogid == 5)
{
if(response)
{
Tur[playerid] = inputtext;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(dialogid == 6)
{
if(response)
{
if(listitem == 0)
{
Boyut1[playerid] = OBJECT_MATERIAL_SIZE_32x32;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 1)
{
boyut1[playerid] = OBJECT_MATERIAL_SIZE_64x32;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 2)
{
boyut1 = OBJECT_MATERIAL_SIZE_64x64;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 3)
{
boyut1 = OBJECT_MATERIAL_SIZE_128x32;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 4)
{
boyut1 = OBJECT_MATERIAL_SIZE_128x64;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 5)
{
boyut1 = OBJECT_MATERIAL_SIZE_128x128;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 6)
{
boyut1 = OBJECT_MATERIAL_SIZE_256x32;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 7)
{
boyut1 = OBJECT_MATERIAL_SIZE_256x64;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 8)
{
boyut1 = OBJECT_MATERIAL_SIZE_256x128;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 9)
{
boyut1 = OBJECT_MATERIAL_SIZE_256x256;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 10)
{
boyut1 = OBJECT_MATERIAL_SIZE_512x64;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 11)
{
boyut1 = OBJECT_MATERIAL_SIZE_512x128;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 12)
{
boyut1 = OBJECT_MATERIAL_SIZE_512x256;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 13)
{
boyut1 = OBJECT_MATERIAL_SIZE_512x512;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
}
if(dialogid == 7)
{
if(response)
{
if(listitem == 0)
{
Tur[playerid] = Verdana;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 1)
{
Tur[playerid] = Georgia;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 2)
{
Tur[playerid] = Comic Sans MS;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 3)
{
Tur[playerid] = Arial;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
if(listitem == 4)
{
Tur[playerid] = Impact;
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Graffiti", "Renk\nBoyut\nTur(arial vs.)\nOluştur", "tamam", "devam");
}
}
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
new Float:aX, Float:aY, Float:aZ,
Float:bX, Float:bY, Float:bZ;
GetObjectPos(graffiti, aX, aY, aZ);
GetObjectRot(graffiti, bX, bY, bZ);
new bb = GetPlayerName(playerid);
new belirle = 1000 + random(99999999999);
new aa = tur;[playerid]
new bb = boyut1[playerid];
new cc = renk[playerid];
new dd = asicerik[playerid];
a[playerid] = aX;
b[playerid] = aY;
c[playerid] = aZ;
d[playerid] = bX;
e[playerid] = bY;
f[playerid] = bZ;
new query[128];
format(query, sizeof(query), "INSERT INTO `graffiti` (`grafid`,`sahip`,`aX`, `aY`, `aZ`, `bX`, `bY`, `bZ`, `tur`, `boyut1`, `renk`, `asicerik`) VALUES ('%d','%s','%f', '%f', '%f', '%f', '%f', '%f', '%s', '%s', '%s', '%s')",belirle,bb,aX,aY,aZ,bX,bY,bZ,aa,bb,cc,dd);
mysql_query(query);
SendClientMessage(playerid,-1,"Graffiti Başarıyla oluşturuldu.");
Graffiti();
}
public Graffiti(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
MySQLCheckConnection();
new query[MAX_GRAFFITI];
new MAX_STRING[256];
format(query, MAX_STRING, "UPDATE Graffiti SET ");
MySQLUpdatePlayerInt(query, GetPVarInt(playerid, "grafid"), "grafid", Graffiti[grafid][grafid]);
MySQLUpdatePlayerTxt(query, GetPVarInt(playerid, "grafid"), "Sahip", Graffiti[grafid][Sahip]);
MySQLUpdatePlayerFlo(query, GetPVarInt(playerid, "grafid"), "aX", Graffiti[grafid][aX]);
MySQLUpdatePlayerFlo(query, GetPVarInt(playerid, "grafid"), "aY", Graffiti[grafid][aY]);
MySQLUpdatePlayerFlo(query, GetPVarInt(playerid, "grafid"), "aX", Graffiti[grafid][aZ]);
MySQLUpdatePlayerFlo(query, GetPVarInt(playerid, "grafid"), "bX", Graffiti[grafid][bX]);
MySQLUpdatePlayerFlo(query, GetPVarInt(playerid, "grafid"), "bY", Graffiti[grafid][bY]);
MySQLUpdatePlayerFlo(query, GetPVarInt(playerid, "grafid"), "bZ", Graffiti[grafid][bZ]);
MySQLUpdatePlayerTxt(query, GetPVarInt(playerid, "grafid"), "tur", Graffiti[grafid][tur]);
MySQLUpdatePlayerTxt(query, GetPVarInt(playerid, "grafid"), "renk", Graffiti[grafid][renk]);
MySQLUpdatePlayerTxt(query, GetPVarInt(playerid, "grafid"), "boyut1", Graffiti[grafid][boyut1]);
MySQLUpdatePlayerTxt(query, GetPVarInt(playerid, "grafid"), "asicerik", Graffiti[grafid][asicerik]);
MySQLUpdateFinish(query, GetPVarInt(playerid, "grafidid"));
}
}
return 1;
}
if (newkeys == KEY_SECONDARY_ATTACK && GetPlayerWeapon(playerid) == 41)
{
SetTimerEx("GraffitiyeBaslandi",20000,false,"i",playerid);
}
forward GraffitiyeBaslandi(playerid);
public GraffitiyeBaslandi(playerid)
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Graffiti","Kullanacağınız yazıyı yazın","Tamam","Зık");
}
Uhm, sorry but the rules a srict only ENGLISH in this forum.. Nice work tough
english or its pointless for us.
I hope someone will translate it in english. Looks interesting.
I think I will translate it using ****** translate. (LoL)
Edit : I managed to translate it,although it wasn't working,so it was a waste of time.