|HELP|Need help with my basic register/login system
#1

HI , i'm new in scripting , so i decide to make a Team Deathmatch server , here is my full GMnow empty i started this morning):
pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp> /* include samp а ne pas enlever */
#include <core>  /* include а ne pas enlever */
#include <float> /* include а ne pas enlever */
#include <time> /* include а ne pas enlever */
#include <file> /* include а ne pas enlever */
#include <utils> /* include а ne pas enlever */
enum pInfo // my enums
{
    pKey[128],
    pAdmin,
    pVip,
    pCash,
    pKills,
    pDeaths,
    pJailed,
    pJailTime,
    pRegistered,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
    new plname[64];
///////////////////////The colors://///////////////////////////////////////
#define COLOR_ASKQ                  0xFF0000FF
#define COLOR_GRAD1                 0xB4B5B7FF
#define COLOR_GRAD2                 0xBFC0C2FF
#define COLOR_GRAD3                 0xCBCCCEFF
#define COLOR_GRAD4                 0xD8D8D8FF
#define COLOR_RED                   0xBD0000FF
#define COLOR_GREY                  0xAFAFAFAA
#define COLOR_GREEN                 0x9EC73DAA
#define COLOR_GROVE                 0x00FF00FF
#define COLOR_LIGHTRED              0xFF6347AA
#define COLOR_LIGHTBLUE             0x33CCFFAA
#define COLOR_LIGHTGREEN            0x9ACD32AA
#define COLOR_YELLOW                0xDABB3EAA
#define COLOR_YELLOW2               0xF5DEB3AA
#define COLOR_ORANGE                0xF64000F6
#define COLOR_WHITE                 0xFFFFFFAA
#define COLOR_PURPLE                0xC2A2DAAA
#define COLOR_DBLUE                 0x2641FEAA
#define COLOR_ALLDEPT               0xFF8282AA
#define COLOR_NEWS                  0x458E1DAA
#define COLOR_OOC                   0xB1C8FBAA
#define cop_color                   0xC2A2DAFF
//////////////////////////////Other defines///////////////////////////////////////
#define Login                       1
#define Register                    2
////////////////////////////////////////////////////////////////////////
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    PlayerInfo[playerid][pRegistered] = 0; //i use this to check if player registered(1=yes 0=no)
    PlayerInfo[playerid][pKey] = 0;  // save the password of the player ;)
    PlayerInfo[playerid][pAdmin] = 0; // Admin level of the player
    PlayerInfo[playerid][pVip] = 0; // VIP level of the player
    PlayerInfo[playerid][pCash] = 0; // THe money of the player
    PlayerInfo[playerid][pKills] = 0; // Kills of the player
    PlayerInfo[playerid][pDeaths] = 0; //how many the player dies
    PlayerInfo[playerid][pJailed] = 0;  //if player jailed (0=no / 1= yes)
    PlayerInfo[playerid][pJailTime] = 0;  // time JAil of the player
   
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
and the Warnings (i don't care for them but i post :
Code:
C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(288) : warning 203: symbol is never used: "IsNumeric"
C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(288) : warning 203: symbol is never used: "ReturnUser"
C:\DOCUME~1\ADMINI~1\Bureau\ALAE\LATDM\GAMEMO~1\LATDM.pwn(288) : warning 203: symbol is never used: "plname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
My problem is i don't know how to contunue my register/login system by using the only include "utils" , i hope you help me
Reply
#2

i can help you add me on:
msn: bundeswehr12@hotmail.de
skype: marcelf52
Reply
#3

thanks TigerKiller i will add you and u can MP me .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)