PDA

View Full Version : Skin saving MySQL


vassilis
17/01/2015, 01:55 AM
how could i save skin so the player the next time he logins doesnt need to choose skin but he will be spawned immediately after login dialog?

Lynn
17/01/2015, 02:48 AM
NOTICE: The below code is using R39-2
Which can be found here: https://github.com/pBlueG/SA-MP-MySQL/releases


// Top of Script
enum PlayerStats // Add the below to your enumerator that stores player data.
{
pID, // Unique SQL ID - Change this to match your script.
pSkin // Player Skin
};
new P_Info[MAX_PLAYERS][PlayerStats];// Used to read from PlayerStats - Rename to your Global variable.



// OnPlayerConnect
P_Info[playerid][pSkin] = 0;// Sets their skin to 0 when they connect, to avoid bugs later.



// OnPlayerDisconnect
P_Info[playerid][pSkin] = GetPlayerSkin(playerid);

// Change WHERE `ID`=%d to whatever your script uses.
mysql_format(mysql, query, sizeof(query),"UPDATE `players` SET `Score`=%d WHERE `ID`=%d", P_Info[playerid][dPlate], P_Info[playerid][pID]);// Updates the Database with their skin ID.
mysql_tquery(mysql, query, "", "");



// OnPlayerSpawn
SetPlayerSkin(playerid, P_Info[playerid][pSkin]);// For registered users use this. Registered users by defualt is 0 so use this accordingly in your script.



// Under your User Account Load function. Usually called when they log in.
P_Info[playerid][pSkin] = cache_get_field_content_int(0, "Skin");

vassilis
17/01/2015, 03:18 AM
NOTICE: The below code is using R39-2
Which can be found here: https://github.com/pBlueG/SA-MP-MySQL/releases


// Top of Script
enum PlayerStats // Add the below to your enumerator that stores player data.
{
pID, // Unique SQL ID - Change this to match your script.
pSkin // Player Skin
};
new P_Info[MAX_PLAYERS][PlayerStats];// Used to read from PlayerStats - Rename to your Global variable.



// OnPlayerConnect
P_Info[playerid][pSkin] = 0;// Sets their skin to 0 when they connect, to avoid bugs later.



// OnPlayerDisconnect
P_Info[playerid][pSkin] = GetPlayerSkin(playerid);

// Change WHERE `ID`=%d to whatever your script uses.
mysql_format(mysql, query, sizeof(query),"UPDATE `players` SET `Score`=%d WHERE `ID`=%d", P_Info[playerid][dPlate], P_Info[playerid][pID]);// Updates the Database with their skin ID.
mysql_tquery(mysql, query, "", "");



// OnPlayerSpawn
SetPlayerSkin(playerid, P_Info[playerid][pSkin]);// For registered users use this. Registered users by defualt is 0 so use this accordingly in your script.



// Under your User Account Load function. Usually called when they log in.
P_Info[playerid][pSkin] = cache_get_field_content_int(0, "Skin");


I got it but to my script when a player logs in he goes to class selection i want to avoid that.. where i should put spawnplayer or something related so i could avoid class selection for players who are already registered?

Lynn
17/01/2015, 03:23 AM
If you are using a AccountLoad Function(Called under OnDialogResponse, Login Dialog)
The place SpawnPlayer(playerid); Under that function as the last thing(Right above the return value.)
Otherwise, place it under DIALOG_LOGIN.

biker122
17/01/2015, 03:29 AM
How do you save the accounts? Which MySQL version do you use?

vassilis
17/01/2015, 03:33 AM
How do you save the accounts? Which MySQL version do you use?

Lynn helped me totally i actually use a load function. I use r39-2
Anyway yes Lynn i use OnAccountLoad function here it is:
function OnPlayerLogin2( playerid, arg1[] ) // arg1 = Password passed
{
new
Hash[ 151 ],
a[ 2 ] = "a",
pname[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, pname, sizeof( pname ) );
WP_Hash( Hash, sizeof( Hash ), arg1 );
format( arg1, 2, "%s", a );

if( strcmp( Hash, pinfo[ playerid ][ Pass ] ) != 0 )
{
ShowPlayerDialog( playerid, dialog_login, DIALOG_STYLE_PASSWORD, "Login", "Please enter your password.", "Enter", "Exit" );
return 1;
}

mysql_format( MySQLTunnel, Hash, sizeof( Hash ), "SELECT * FROM `accounts` WHERE `pname` = '%e'", pname );
mysql_pquery( MySQLTunnel, Hash, "OnAccountLoad", "d", playerid );

return 1;
}

function OnAccountLoad( playerid )
{
if( cache_get_row_count( MySQLTunnel ) )
{
pinfo[ playerid ][ pMySQLID ] = cache_get_field_content_int( 0, "pid", MySQLTunnel );
pinfo[ playerid ][ Admin ] = cache_get_field_content_int( 0, "padmin", MySQLTunnel );
pinfo[ playerid ][ VIP ] = cache_get_field_content_int( 0, "pvip", MySQLTunnel );
pinfo[ playerid ][ Score ] = cache_get_field_content_int( 0, "pscore", MySQLTunnel );
pinfo[ playerid ][ Money ] = cache_get_field_content_int( 0, "pmoney", MySQLTunnel );
pinfo[ playerid ][ Kills ] = cache_get_field_content_int( 0, "pkills", MySQLTunnel );
pinfo[ playerid ][ Deaths ] = cache_get_field_content_int( 0, "pdeaths", MySQLTunnel );
pinfo[ playerid ][ Banned ] = cache_get_field_content_int( 0, "pbanned", MySQLTunnel );
pinfo[ playerid ][ Hours ] = cache_get_field_content_int( 0, "phours", MySQLTunnel );
pinfo[ playerid ][ Minutes ] = cache_get_field_content_int( 0, "pminutes", MySQLTunnel );
pinfo[ playerid ][ Terskill ] = cache_get_field_content_int( 0, "pterskill", MySQLTunnel );
pinfo[ playerid ][ Robskill ] = cache_get_field_content_int( 0, "probskill", MySQLTunnel );
pinfo[ playerid ][ Hitmanskill ] = cache_get_field_content_int( 0, "phitmanskill", MySQLTunnel );
pinfo[ playerid ][ WantedLevel ] = cache_get_field_content_int( 0, "pwantedlevel", MySQLTunnel );
pinfo[ playerid ][ Muted ] = cache_get_field_content_int( 0, "pmuted", MySQLTunnel );
pinfo[ playerid ][ TotalRobs ] = cache_get_field_content_int( 0, "ptotalrobs", MySQLTunnel );
pinfo[ playerid ][ Freezed ] = cache_get_field_content_int( 0, "pfreezed", MySQLTunnel );
pinfo[ playerid ][ Jailed ] = cache_get_field_content_int( 0, "pjailed", MySQLTunnel );
pinfo[ playerid ][ JailTime ] = cache_get_field_content_int( 0, "pjailtime", MySQLTunnel );
pinfo[ playerid ][ Cuffed ] = cache_get_field_content_int( 0, "pcuffed", MySQLTunnel );


pinfo[ playerid ][ pLogged ] = 1;
SetPlayerScore(playerid,pinfo[playerid][Score]);
GivePlayerMoney(playerid,pinfo[playerid][Money]);
SetPlayerWantedLevel(playerid,pinfo[playerid][WantedLevel]);

}
return 1;
}

biker122
17/01/2015, 03:44 AM
Okay. Can you just show me how you save the accounts?

Lynn
17/01/2015, 03:49 AM
Under;
SetPlayerWantedLevel(playerid,pinfo[playerid][WantedLevel]);
Do the SpawnPlayer(playerid);

That should work.
You can do the same thing under the Register Account function(Unless you want them to select skin on Register.)

Okay. Can you just show me how you save the accounts?

MySQL Threaded Queries - SQL R7.(BlueG Plugin, R39-2 On Github.)
http://forum.sa-mp.com/showthread.php?t=485633

biker122
17/01/2015, 03:53 AM
Under;
SetPlayerWantedLevel(playerid,pinfo[playerid][WantedLevel]);
Do the SpawnPlayer(playerid);

That should work.
You can do the same thing under the Register Account function(Unless you want them to select skin on Register.)

No that won't work perfectly. He first has to check if the player has saved a skin, if the player has saved his own skin, the script should auto-spawn him.

So, this is how it should look like:

enum player_data
{
Skin
};
new pinfo[ MAX_PLAYERS ][ player_data ];

public OnPlayerDisconnect( playerid, reason )
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof pname);
mysql_format(MySQLTunnel, Query1, "UPDATE `accounts` SET `pskin` = '%i' WHERE `pname` = '%e'", GetPlayerSkin(playerid), pname);
mysql_tquery(MySQLTunnel, Query1, "", "");
return 1;
}

function OnAccountLoad( playerid )
{
if( cache_get_row_count( MySQLTunnel ) )
{
pinfo[ playerid ][ pMySQLID ] = cache_get_field_content_int( 0, "pid", MySQLTunnel );
pinfo[ playerid ][ Admin ] = cache_get_field_content_int( 0, "padmin", MySQLTunnel );
pinfo[ playerid ][ VIP ] = cache_get_field_content_int( 0, "pvip", MySQLTunnel );
pinfo[ playerid ][ Score ] = cache_get_field_content_int( 0, "pscore", MySQLTunnel );
pinfo[ playerid ][ Money ] = cache_get_field_content_int( 0, "pmoney", MySQLTunnel );
pinfo[ playerid ][ Kills ] = cache_get_field_content_int( 0, "pkills", MySQLTunnel );
pinfo[ playerid ][ Deaths ] = cache_get_field_content_int( 0, "pdeaths", MySQLTunnel );
pinfo[ playerid ][ Banned ] = cache_get_field_content_int( 0, "pbanned", MySQLTunnel );
pinfo[ playerid ][ Hours ] = cache_get_field_content_int( 0, "phours", MySQLTunnel );
pinfo[ playerid ][ Minutes ] = cache_get_field_content_int( 0, "pminutes", MySQLTunnel );
pinfo[ playerid ][ Terskill ] = cache_get_field_content_int( 0, "pterskill", MySQLTunnel );
pinfo[ playerid ][ Robskill ] = cache_get_field_content_int( 0, "probskill", MySQLTunnel );
pinfo[ playerid ][ Hitmanskill ] = cache_get_field_content_int( 0, "phitmanskill", MySQLTunnel );
pinfo[ playerid ][ WantedLevel ] = cache_get_field_content_int( 0, "pwantedlevel", MySQLTunnel );
pinfo[ playerid ][ Muted ] = cache_get_field_content_int( 0, "pmuted", MySQLTunnel );
pinfo[ playerid ][ TotalRobs ] = cache_get_field_content_int( 0, "ptotalrobs", MySQLTunnel );
pinfo[ playerid ][ Freezed ] = cache_get_field_content_int( 0, "pfreezed", MySQLTunnel );
pinfo[ playerid ][ Jailed ] = cache_get_field_content_int( 0, "pjailed", MySQLTunnel );
pinfo[ playerid ][ JailTime ] = cache_get_field_content_int( 0, "pjailtime", MySQLTunnel );
pinfo[ playerid ][ Cuffed ] = cache_get_field_content_int( 0, "pcuffed", MySQLTunnel );
pinfo[ playerid ][ Skin ] = cache_get_field_content_int( 0, "pskin", MySQLTunnel );


pinfo[ playerid ][ pLogged ] = 1;
SetPlayerScore(playerid,pinfo[playerid][Score]);
GivePlayerMoney(playerid,pinfo[playerid][Money]);
SetPlayerWantedLevel(playerid,pinfo[playerid][WantedLevel]);
if( pinfo[ playerid ][ Skin ] != -1) SpawnPlayer(playerid);
}
return 1;
}

For this to work, you need to reset the value of pinfo[playerid][Skin] to -1 when the player connects/disconnects.

Lynn
17/01/2015, 04:03 AM
----

The value is stored on log out, and can't equal anything other then 0-299.
The function is only called when the player logs in, and the Skin is autoset to 0 on Connect.
So even if a value isn't stored in the database, it's still 0 which is a valid skin ID.

However, he will have to add the Skin variable to his AccountLoad Function but I'm sure he already knows that
If he's able to write other functions in MySQL. It seemed useless to inform him of knowledge he already knows.

biker122
17/01/2015, 04:12 AM
If he's able to write those functions, why can't he just make a simple auto-spawn system?
The value is stored on log out, and can't equal anything other then 0-299.
The function is only called when the player logs in, and the Skin is autoset to 0 on Connect.
So even if a value isn't stored in the database, it's still 0 which is a valid skin ID.

However, he will have to add the Skin variable to his AccountLoad Function but I'm sure he already knows that
If he's able to write other functions in MySQL. It seemed useless to inform him of knowledge he already knows.
1. We must be setting it to -1, while connecting/disconnecting.
2. If the value of the saved variable "Skin"s value is -1, then we take the player to class selection.
3. If the value is not -1, we spawn the player.

If the pinfo[playerid][Skin] variable is set to 0, the player will spawn with CJ Skin.

Lynn
17/01/2015, 04:30 AM
If he's able to write those functions, why can't he just make a simple auto-spawn system?

1. We must be setting it to -1, while connecting/disconnecting.
2. If the value of the saved variable "Skin"s value is -1, then we take the player to class selection.
3. If the value is not -1, we spawn the player.

If the pinfo[playerid][Skin] variable is set to 0, the player will spawn with CJ Skin.

You only spawn with the CJ Skin if no variable is stored in the Database.
Otherwise, it's loaded from the database and pinfo[playerid][Skin] value is set to the stored number in the database.
Also, SAMP Messed up with their SpawnPlayer(playerid) function, and it only works if used through functions other then OnPlayerConnect or OnPlayerRequestClass. He can set the value to -1 if he wants, but there is no point.
Data is already autoset to a default when a client connects.

vassilis
17/01/2015, 04:36 AM
SaveAccount( playerid )
{
mysql_format( MySQLTunnel, Query, sizeof( Query ), "UPDATE `accounts` SET `padmin` = '%d',\
`pvip` = '%d',\
`pscore` = '%d',\
`pmoney` = '%d',\
`pkills` = '%d',\
`pdeaths` = '%d',\
`pbanned` = '%d',\
`phours` = '%d',\
`pminutes` = '%d',\
`pterskill` = '%d',\
`probskill` = '%d',\
`phitmanskill` = '%d',\
`pwantedlevel` = '%d',\
`pmuted` = '%d',\
`ptotalrobs` = '%d',\
`pfreezed` = '%d',\
`pjailed` = '%d' WHERE `pid` = '%i'",
pinfo[ playerid ][ Admin ],
pinfo[ playerid ][ VIP ],
pinfo[ playerid ][ Score ],
pinfo[ playerid ][ Money ],
pinfo[ playerid ][ Kills ],
pinfo[ playerid ][ Deaths ],
pinfo[ playerid ][ Banned ],
pinfo[ playerid ][ Hours ],
pinfo[ playerid ][ Minutes ],
pinfo[ playerid ][ Terskill ],
pinfo[ playerid ][ Robskill ],
pinfo[ playerid ][ Hitmanskill ],
pinfo[ playerid ][ WantedLevel ],
pinfo[ playerid ][ Muted ],
pinfo[ playerid ][ TotalRobs ],
pinfo[ playerid ][ Freezed ],
pinfo[ playerid ][ Jailed ],
pinfo[ playerid ][ pMySQLID ]
);

format( Query, sizeof( Query ), "%s\
`pjailtime` = '%d',\
`pcuffed` = '%d' WHERE `pid` = '%d'",
Query,
pinfo[ playerid ][ JailTime ],
pinfo[ playerid ][ Cuffed ],
pinfo[ playerid ][ pMySQLID ]
);

mysql_pquery( MySQLTunnel, Query );
return 1;
}
@bike's reply for saveaccount function..
so how should it work actually???

Lynn
17/01/2015, 04:52 AM
SaveAccount( playerid )
{
mysql_format( MySQLTunnel, Query, sizeof( Query ), "UPDATE `accounts` SET `padmin` = '%d',\
`pvip` = '%d',\
`pscore` = '%d',\
`pmoney` = '%d',\
`pkills` = '%d',\
`pdeaths` = '%d',\
`pbanned` = '%d',\
`phours` = '%d',\
`pminutes` = '%d',\
`pterskill` = '%d',\
`probskill` = '%d',\
`phitmanskill` = '%d',\
`pwantedlevel` = '%d',\
`pmuted` = '%d',\
`ptotalrobs` = '%d',\
`pfreezed` = '%d',\
`pjailed` = '%d',\
`pskin` WHERE `pid` = '%i'",
pinfo[ playerid ][ Admin ],
pinfo[ playerid ][ VIP ],
pinfo[ playerid ][ Score ],
pinfo[ playerid ][ Money ],
pinfo[ playerid ][ Kills ],
pinfo[ playerid ][ Deaths ],
pinfo[ playerid ][ Banned ],
pinfo[ playerid ][ Hours ],
pinfo[ playerid ][ Minutes ],
pinfo[ playerid ][ Terskill ],
pinfo[ playerid ][ Robskill ],
pinfo[ playerid ][ Hitmanskill ],
pinfo[ playerid ][ WantedLevel ],
pinfo[ playerid ][ Muted ],
pinfo[ playerid ][ TotalRobs ],
pinfo[ playerid ][ Freezed ],
pinfo[ playerid ][ Jailed ],
pinfo[ playerid ][ pMySQLID ]
pinfo[ playerid ][ pSkin ] // Change pSkin to your skin variable.

);

format( Query, sizeof( Query ), "%s\
`pjailtime` = '%d',\
`pcuffed` = '%d' WHERE `pid` = '%d'",
Query,
pinfo[ playerid ][ JailTime ],
pinfo[ playerid ][ Cuffed ],
pinfo[ playerid ][ pMySQLID ]
);

mysql_pquery( MySQLTunnel, Query );
return 1;
}

You don't need to add what he's telling you.
Due to the reasons I posted in my previous posts.
IF you weren't already setting the value to 0 on connect, then his theory would be correct.

biker122
17/01/2015, 04:55 AM
Look your code, Lynn. He will get a MySQL error if he runs that code. "`pskin` WHERE `pid` = '...."
Total code:

enum player_info
{
Skin
};
new pinfo[MAX_PLAYERS][player_info];

public OnPlayerConnect( playerid )
{
pinfo[playerid][Skin] = -1;
return 1;
}

public OnPlayerDisconnect( playerid, reason )
{
SaveAccount( playerid );
pinfo[playerid][Skin] = -1;
return 1;
}

function OnAccountLoad( playerid )
{
if( cache_get_row_count( MySQLTunnel ) )
{
pinfo[ playerid ][ pMySQLID ] = cache_get_field_content_int( 0, "pid", MySQLTunnel );
pinfo[ playerid ][ Admin ] = cache_get_field_content_int( 0, "padmin", MySQLTunnel );
pinfo[ playerid ][ VIP ] = cache_get_field_content_int( 0, "pvip", MySQLTunnel );
pinfo[ playerid ][ Score ] = cache_get_field_content_int( 0, "pscore", MySQLTunnel );
pinfo[ playerid ][ Money ] = cache_get_field_content_int( 0, "pmoney", MySQLTunnel );
pinfo[ playerid ][ Kills ] = cache_get_field_content_int( 0, "pkills", MySQLTunnel );
pinfo[ playerid ][ Deaths ] = cache_get_field_content_int( 0, "pdeaths", MySQLTunnel );
pinfo[ playerid ][ Banned ] = cache_get_field_content_int( 0, "pbanned", MySQLTunnel );
pinfo[ playerid ][ Hours ] = cache_get_field_content_int( 0, "phours", MySQLTunnel );
pinfo[ playerid ][ Minutes ] = cache_get_field_content_int( 0, "pminutes", MySQLTunnel );
pinfo[ playerid ][ Terskill ] = cache_get_field_content_int( 0, "pterskill", MySQLTunnel );
pinfo[ playerid ][ Robskill ] = cache_get_field_content_int( 0, "probskill", MySQLTunnel );
pinfo[ playerid ][ Hitmanskill ] = cache_get_field_content_int( 0, "phitmanskill", MySQLTunnel );
pinfo[ playerid ][ WantedLevel ] = cache_get_field_content_int( 0, "pwantedlevel", MySQLTunnel );
pinfo[ playerid ][ Muted ] = cache_get_field_content_int( 0, "pmuted", MySQLTunnel );
pinfo[ playerid ][ TotalRobs ] = cache_get_field_content_int( 0, "ptotalrobs", MySQLTunnel );
pinfo[ playerid ][ Freezed ] = cache_get_field_content_int( 0, "pfreezed", MySQLTunnel );
pinfo[ playerid ][ Jailed ] = cache_get_field_content_int( 0, "pjailed", MySQLTunnel );
pinfo[ playerid ][ JailTime ] = cache_get_field_content_int( 0, "pjailtime", MySQLTunnel );
pinfo[ playerid ][ Cuffed ] = cache_get_field_content_int( 0, "pcuffed", MySQLTunnel );
pinfo[ playerid ][ Skin ] = cache_get_field_content_int( 0, "pskin", MySQLTunnel );


pinfo[ playerid ][ pLogged ] = 1;
SetPlayerScore(playerid,pinfo[playerid][Score]);
GivePlayerMoney(playerid,pinfo[playerid][Money]);
SetPlayerWantedLevel(playerid,pinfo[playerid][WantedLevel]);
if( pinfo[ playerid ][ Skin ] != -1) SpawnPlayer(playerid);
}
return 1;
}

SaveAccount( playerid )
{
mysql_format( MySQLTunnel, Query, sizeof( Query ), "UPDATE `accounts` SET `padmin` = '%d',\
`pvip` = '%d',\
`pscore` = '%d',\
`pmoney` = '%d',\
`pkills` = '%d',\
`pdeaths` = '%d',\
`pbanned` = '%d',\
`phours` = '%d',\
`pminutes` = '%d',\
`pterskill` = '%d',\
`probskill` = '%d',\
`phitmanskill` = '%d',\
`pwantedlevel` = '%d',\
`pmuted` = '%d',\
`ptotalrobs` = '%d',\
`pfreezed` = '%d',\
`pjailed` = '%d', \
`pskin` = '%d' WHERE `pid` = '%i'",
pinfo[ playerid ][ Admin ],
pinfo[ playerid ][ VIP ],
pinfo[ playerid ][ Score ],
pinfo[ playerid ][ Money ],
pinfo[ playerid ][ Kills ],
pinfo[ playerid ][ Deaths ],
pinfo[ playerid ][ Banned ],
pinfo[ playerid ][ Hours ],
pinfo[ playerid ][ Minutes ],
pinfo[ playerid ][ Terskill ],
pinfo[ playerid ][ Robskill ],
pinfo[ playerid ][ Hitmanskill ],
pinfo[ playerid ][ WantedLevel ],
pinfo[ playerid ][ Muted ],
pinfo[ playerid ][ TotalRobs ],
pinfo[ playerid ][ Freezed ],
pinfo[ playerid ][ Jailed ],
GetPlayerSkin(playerid), // use this or use pinfo[playerid][Skin] if you're changing its value.
pinfo[ playerid ][ pMySQLID ]
);

format( Query, sizeof( Query ), "%s\
`pjailtime` = '%d',\
`pcuffed` = '%d' WHERE `pid` = '%d'",
Query,
pinfo[ playerid ][ JailTime ],
pinfo[ playerid ][ Cuffed ],
pinfo[ playerid ][ pMySQLID ]
);

mysql_pquery( MySQLTunnel, Query );
return 1;
}

Lynn
17/01/2015, 05:18 AM
I'm running that code, and I do not get any errors.
He has to alter the code to his own coding, obviously he can't just Copy + Paste my code.

biker122
17/01/2015, 05:21 AM
I'm running that code, and I do not get any errors.
That obviously won't save the value. What you have wrote is:

mysql_format( MySQLTunnel, Query, sizeof( Query ), "UPDATE `accounts` SET `padmin` = '%d',\
`pvip` = '%d',\
`pscore` = '%d',\
`pmoney` = '%d',\
`pkills` = '%d',\
`pdeaths` = '%d',\
`pbanned` = '%d',\
`phours` = '%d',\
`pminutes` = '%d',\
`pterskill` = '%d',\
`probskill` = '%d',\
`phitmanskill` = '%d',\
`pwantedlevel` = '%d',\
`pmuted` = '%d',\
`ptotalrobs` = '%d',\
`pfreezed` = '%d',\
`pjailed` = '%d',\
`pskin` WHERE `pid` = '%i'",

See the last line.

Lynn
17/01/2015, 05:31 AM
My bad, you're right it should be:
pinfo[playerid][pskin] = GetPlayerSkin(playerid);
`pskin` = '%d' WHERE `pid` = '%i'",

vassilis
17/01/2015, 03:45 PM
Thanks guys but ye i am not really from the people that just copy paste, i try to understand my questions.. Thanks for feedback !