Jump to content

Script slaat gegevens niet op


Recommended Posts

Geplaatst: (bewerkt)

Mijn script slaat geen gevens op:S

hier is register command:

//-------------------------------[Register]--------------------------------------------------------------------------

if(strcmp(cmd, "/register", true) == 0 || strcmp(cmd, "/regnick", true) == 0)

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");

return 1;

}

if (gPlayerAccount[playerid] == 1)

{

SendClientMessage(playerid, COLOR_GRAD1, " That name is registered");

return 1;

}

gPlayerAccount[playerid] = 1;

/*

SetPlayerInterior(playerid,2);

SetPlayerPos(playerid,1216.699000,-6.416779,1001.328000);

SetPlayerFacingAngle(playerid, 90.0);

SetPlayerCameraPos(playerid,1216.699000-1.5,-6.416779,1001.328000+0.7);

SetPlayerCameraLookAt(playerid,1216.699000,-6.416779,1001.328000+0.7);

GameTextForPlayer(playerid, "~w~Now Select a character and type /login <your password>", 10000, 3);*/

strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);

Encript(PlayerInfo[playerid][pPassword]);

GetPlayerName(playerid, playername, sizeof(playername));

PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);

new query[200];

new usernamelol[26];

GetPlayerName(playerid, usernamelol, 26);

format(query, sizeof(query), "SELECT * FROM users WHERE name='%s'", usernamelol);

MySQLCheckConnection();

samp_mysql_query(query);

samp_mysql_store_result();

if (samp_mysql_num_rows() >= 1)

{

SendClientMessage(playerid, COLOR_GRAD1, " That nick is registered");

return 1;

}

format(query, sizeof(query), "INSERT INTO users (name, house, biz) VALUES ('%s', 255, 255)", usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET IP='%s' WHERE name='%s'", PlayerInfo[playerid][pIP], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET stored='%d' WHERE name='%s'", PlayerInfo[playerid][pStored], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET jail='%d' WHERE name='%s'", PlayerInfo[playerid][pJailed], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET armour='%.1f' WHERE name='%s'", PlayerInfo[playerid][pSArmour], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET warn='%d' WHERE name='%s'", PlayerInfo[playerid][pWarnL], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET duty='%d' WHERE name='%s'", PlayerInfo[playerid][pDuty], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET number='%d' WHERE name='%s'", PlayerInfo[playerid][pPnumber], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET local='%d' WHERE name='%s'", PlayerInfo[playerid][pLocal], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET interior='%d' WHERE name='%s'", PlayerInfo[playerid][pInt], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET licensec='%d' WHERE name='%s'", PlayerInfo[playerid][pLicenseC], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET licenseb='%d' WHERE name='%s'", PlayerInfo[playerid][pLicenseB], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET licensea='%d' WHERE name='%s'", PlayerInfo[playerid][pLicenseA], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET shealth='%.1f' WHERE name='%s'", PlayerInfo[playerid][pSHealth], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo7='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo7], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo6='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo6], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo5='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo5], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo4='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo4], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo3='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo3], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo2='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo2], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET ammo1='%d' WHERE name='%s'", PlayerInfo[playerid][pAmmo1], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun7='%d' WHERE name='%s'", PlayerInfo[playerid][pGun7], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun6='%d' WHERE name='%s'", PlayerInfo[playerid][pGun6], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun5='%d' WHERE name='%s'", PlayerInfo[playerid][pGun5], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun4='%d' WHERE name='%s'", PlayerInfo[playerid][pGun4], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun3='%d' WHERE name='%s'", PlayerInfo[playerid][pGun3], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun2='%d' WHERE name='%s'", PlayerInfo[playerid][pGun2], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET gun1='%d' WHERE name='%s'", PlayerInfo[playerid][pGun1], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET mwkills='%d' WHERE name='%s'", PlayerInfo[playerid][pPEN], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET deathmatch='%d' WHERE name='%s'", PlayerInfo[playerid][pWA], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET streetrace='%d' WHERE name='%s'", PlayerInfo[playerid][pSR], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET hotwire='%d' WHERE name='%s'", PlayerInfo[playerid][pHW], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET cashbox='%d' WHERE name='%s'", PlayerInfo[playerid][pCB], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET kills='%d' WHERE name='%s'", PlayerInfo[playerid][pKills], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET admin='%d' WHERE name='%s'", PlayerInfo[playerid][pAdmin], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET password='%s' WHERE name='%s'", PlayerInfo[playerid][pPassword], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET level='%d' WHERE name='%s'", PlayerInfo[playerid][pLevel], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET account='%d' WHERE name='%s'", PlayerInfo[playerid][pAccount], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET money='%d' WHERE name='%s'", PlayerInfo[playerid][pCash], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET exp='%d' WHERE name='%s'", PlayerInfo[playerid][pExp], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET drugs='%d' WHERE name='%s'", PlayerInfo[playerid][pDrugs], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET skin='%d' WHERE name='%s'", PlayerInfo[playerid][pModel], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET team='%d' WHERE name='%s'", PlayerInfo[playerid][pTeam], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET rank='%d' WHERE name='%s'", PlayerInfo[playerid][pRank], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET upgrades='%d' WHERE name='%s'", PlayerInfo[playerid][gPupgrade], usernamelol); samp_mysql_query(query);

format(query, sizeof(query), "UPDATE users SET job='%d' WHERE name='%s'", PlayerInfo[playerid][pJRank], usernamelol); samp_mysql_query(query);

new newaccountsqlid = MySQLCheckAccount(usernamelol);

if (newaccountsqlid != 0)

{

PlayerInfo[playerid][pSQLID] = newaccountsqlid;

}

SendClientMessage(playerid, COLOR_WHITE, "SERVER: Next time you connect, type (/login <password>) to log in.");

OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]);

return 1;

}

Bewerkt: door geerdinho8

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

×   Je hebt text geplaatst met opmaak.   Opmaak verwijderen

  Only 75 emoji are allowed.

×   Je link is automatisch ingevoegd.   In plaats daarvan weergeven als link

×   Je vorige bewerkingen zijn hersteld.   Alles verwijderen

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent actief   0 leden

    • Er zijn hier geen geregistreerde gebruikers aanwezig.
×
×
  • Create New...