eh, I'm stuck and i can't get pass this point! It's getting on my nerves Helpplz
#1

I need help with a scirpt, It's none of the gamemodes on this site, I can't get my register and logon system to work, I won't post the scirpt on the forums.
Reply
#2

then.. if you dont post it and no error's what accour.. how people can help you then ?!
Reply
#3

Quote:
Originally Posted by Static_X
then.. if you dont post it and no error's what accour.. how people can help you then ?!
Give him the script? lol...
That's what the Script Request topic is for.
Reply
#4

I get no errors, The scirpt compiles fine, But when i do /register mypassword it creats a file for my name then i do /login mypassword it's saying the password dosen't match my name, I've looked at the file it makes after Turning Encrypt off and it type the correct password in the file but it's not working when i try to /login

If you're willing to help me, I will send the scirpt through pm, that's about it
Reply
#5

HE Give me HIS SCRIPT?... nono... atleast the line's where error's accoure.. ******. is right
Reply
#6

ok, so i've decided to upload it, I will delte it tommorow or later on tonight if someone helps me, if not still gonna be delted

Reply
#7

Quote:
Originally Posted by ssǝן‾ʎ
We're willing to help you but you need to show us the script for us to do so!
<link removed pasterbin down below>
Reply
#8

Whos gonna download it..?
Reply
#9

Quote:
Originally Posted by Mikep
Whos gonna download it..?
it's to big to post in pasterbin? it's like 20k lines it froze my web broswer while trying to, But i guess i could try again, Well i've tried and pasterbin didn't work so you're going to have to download
Reply
#10

I gussed you would just be posting the register and login shiz..
Reply
#11

Quote:
Originally Posted by Mikep
I gussed you would just be posting the register and login shiz..
Ok, done

/register

Код:
if(strcmp(cmd, "/regnick", true) == 0 || strcmp(cmd, "/register", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
return 1;
}
new passlength = strlen(tmp);
if(passlength > 10)
{
SendClientMessage(playerid, COLOR_RED, "Sorry, passwords must be smaller than 10 letters");
return 1;
}
if (gPlayerAccount[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " That name is registered");
return 1;
}
gPlayerAccount[playerid] = 1;
strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);
Encript(PlayerInfo[playerid][pPassword]);
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s.cer", playername);
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash];
new File: file = fopen(string, io_read);
if (file)
{
SendClientMessage(playerid, COLOR_GRAD1, " That nick is registered");
fclose(file);
return 1;
}
printf("%s has created an account.", playername);
new File:hFile;
hFile = fopen(string, io_append);
new var[32];//
format(var, 32, "%sn", PlayerInfo[playerid][pPassword]);fwrite(hFile, var);
format(var, 32, "%d pCashn", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
format(var, 32, "%d pAccountn", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
format(var, 32, "%d pAdminn", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "%d pLeveln", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "%d pExpn", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
format(var, 32, "%d gPupgraden", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 32, "%d pKillsn", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 32, "%d pLJn", PlayerInfo[playerid][pLJ]);fwrite(hFile, var);
format(var, 32, "%d pIJn", PlayerInfo[playerid][pIJ]);fwrite(hFile, var);
format(var, 32, "%d pSRn", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
format(var, 32, "%d pWAn", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
format(var, 32, "%d pPENn", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
format(var, 32, "%d pGun1n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
format(var, 32, "%d pGun2n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
format(var, 32, "%d pGun3n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
format(var, 32, "%d pGun4n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
format(var, 32, "%d pGun5n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
format(var, 32, "%d pGun6n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
format(var, 32, "%d pAmmo1n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
format(var, 32, "%d pAmmo2n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
format(var, 32, "%d pAmmo3n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
format(var, 32, "%d pAmmo4n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
format(var, 32, "%d pAmmo5n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
format(var, 32, "%d pAmmo6n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
format(var, 32, "%f pSHealthn", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
format(var, 32, "%f pHealthn", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
format(var, 32, "%f pPos_xn", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
format(var, 32, "%f pPos_yn", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
format(var, 32, "%f pPos_zn", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
if(accountplay)
{
PlayerInfo[playerid][pInt] = 0;
}
format(var, 32, "%d pIntn", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
format(var, 32, "%d pLocaln", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
format(var, 32, "%d pTeamn", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
format(var, 32, "%d pModeln", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
format(var, 32, "%d pPnumbern", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
format(var, 32, "%d pPhousekeyn", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 32, "%d pPbiskeyn", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
format(var, 32, "%d pGangn", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 32, "%d pGleadern", PlayerInfo[playerid][pGleader]);fwrite(hFile, var);
format(var, 32, "%d pServicen", PlayerInfo[playerid][pService]);fwrite(hFile, var);
format(var, 32, "%d pSleadern", PlayerInfo[playerid][pSleader]);fwrite(hFile, var);
format(var, 32, "%d pRealAdminn", PlayerInfo[playerid][pRealAdmin]);fwrite(hFile, var);
format(var, 32, "%d pTOSn", PlayerInfo[playerid][pTOS]);fwrite(hFile, var);
format(var, 32, "%d pJobn", PlayerInfo[playerid][pJob]);fwrite(hFile, var);
format(var, 32, "%d pGLicensen", PlayerInfo[playerid][pGLicense]);fwrite(hFile, var);
format(var, 32, "%d pDLicensen", PlayerInfo[playerid][pDLicense]);fwrite(hFile, var);
format(var, 32, "%d pResignn", PlayerInfo[playerid][pResign]);fwrite(hFile, var);
format(var, 32, "%d pFLicensen", PlayerInfo[playerid][pFLicense]);fwrite(hFile, var);
format(var, 32, "%d pAlcaholn", PlayerInfo[playerid][pAlcahol]);fwrite(hFile, var);
format(var, 32, "%d pDPointsn", PlayerInfo[playerid][pDPoints]);fwrite(hFile, var);
format(var, 32, "%d pGPointsn", PlayerInfo[playerid][pGPoints]);fwrite(hFile, var);
format(var, 32, "%d pSuspendedn", PlayerInfo[playerid][pSuspended]);fwrite(hFile, var);
format(var, 32, "%d pPaycheckn", PlayerInfo[playerid][pPaycheck]);fwrite(hFile, var);
format(var, 32, "%d pDrugsn", PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
format(var, 32, "%d pResetn", PlayerInfo[playerid][pReset]);fwrite(hFile, var);
format(var, 32, "%d pCKeyn", PlayerInfo[playerid][pCKey]);fwrite(hFile, var);
format(var, 32, "%d pHotwiren", PlayerInfo[playerid][pHotwire]);fwrite(hFile, var);
format(var, 32, "%d pDonationn", PlayerInfo[playerid][pDonation]);fwrite(hFile, var);
format(var, 32, "%d pCLicensen", PlayerInfo[playerid][pCLicense]);fwrite(hFile, var);
format(var, 32, "%d pStrengthn", PlayerInfo[playerid][pStrength]);fwrite(hFile, var);
format(var, 32, "%d pTLicensen", PlayerInfo[playerid][pTLicense]);fwrite(hFile, var);
fclose(hFile);
GameTextForPlayer(playerid, "SERVER: Next time you connect type /login password to log in", 5000, 3);
justreg[playerid] = 1;
OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]);
return 1;
}
/login

Код:
if (strcmp(cmd, "/login", true) ==0 )
{
new tmppass[64];
if (gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /login [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encript(tmppass);
if (gdebug){printf("DEBUG enterd %s", tmppass);}
OnPlayerLogin(playerid,tmppass);
return 1;
}
do i need anything esle? I will post.
Reply
#12

often times the "\r" or "\n" added to the line will add a character for each, so you'll need to strmid them from 0 to strlen -1. or using format ".*s" strlen(line)-1,line


[OFF-TOPIC] My shirt smells odd, not bad, but odd. Like the first time you walk into a friends house, there's always that instant wiff of "different"
Reply
#13

Quote:
Originally Posted by SilentHuntR
often times the "\r" or "\n" added to the line will add a character for each, so you'll need to strmid them from 0 to strlen -1. or using format ".*s" strlen(line)-1,line


[OFF-TOPIC] My shirt smells odd, not bad, but odd. Like the first time you walk into a friends house, there's always that instant wiff of "different"
Mind tellin me where i should change that?, this is my first scirpt, it took me forever to get this far. I'm still in the process of learning
Reply
#14

where you guys getting this /r and /n from, I don't got those in my code, unless you're talkin about the command /register or /regnick ,eh i can't find out where you guys are talking about, Possibly if ya can fix the code and repost it? Cause i can't find the error
Reply
#15

*Bump*

Help please?
Reply
#16

*Bump again*

I take it no one knows what is wrong with my register and logon system, you need some more info? like the save and load player? or maybe OnPlayerLogin? eh.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)