SA-MP Forums Archive
Errors in my register system. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Errors in my register system. (/showthread.php?tid=253881)



Errors in my register system. - justsomeguy - 08.05.2011

Hey i got this script:
pawn Код:
/*  Project Civil War bye Justsomeguy and Marilem.
    This project is about making an change into the world of TDM and finally,
    Not an RP server cuz it is sow overused.
    The server will be more uniqeu then others as this one is made from scratch.
    note to self:
    #watch this vid:
    [ame]http://www.youtube.com/watch?v=xWYdJQGiDFQ[/ame]
    #Fix register system.
    #Make an group system(NORTH AMERICA V/S SOUTH AMERICA).
*/

#include <a_samp>
#include <streamer>
#include <COLORS>
#include <dini>
#include <dudb>
#include <utils>
#include "../include/gl_common.inc"
#define SERVER_USER_FILE "Civil War userfile/%s.ini"
  ///TEAMS
#define SOUTH 1
#define NORTH 2
#define SCM SendClientMessage
#define SCMT SendClientMessageToAll
/*Holding object defines */
#define WEAPON_TYPE_NONE    (0)
#define WEAPON_TYPE_HEAVY   (1)
#define WEAPON_TYPE_LIGHT   (2)
#define WEAPON_TYPE_MELEE   (3)//Nahkampf
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define MAX_OBJ 50 // Limit
new Purgotary[MAX_PLAYERS];
forward purgotary(playerid);
forward AntiSpawnKill(playerid);
new Text:Textdraw;
new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
new isLogged[MAX_PLAYERS];
new Level[MAX_PLAYERS];
new Admin[MAX_PLAYERS];
new isMuted[MAX_PLAYERS];
new Warns[MAX_PLAYERS];
new SkillPoints[MAX_PLAYERS];
new Deagle[MAX_PLAYERS];
new Shotgun[MAX_PLAYERS];
new Spas[MAX_PLAYERS];
new MP5[MAX_PLAYERS];
new Ak47[MAX_PLAYERS];
new M4[MAX_PLAYERS];
new Sniper[MAX_PLAYERS];
new Text3D:admlabl[MAX_PLAYERS];

// -----------------------------------------------------------------------------
new Float:ObjCoords[MAX_OBJ][3];
new object[MAX_OBJ];
new ObjectID[MAX_OBJ][2];
// -----------------------------------------------------------------------------
new GunNames[48][] = {
    "Nothink",
    "Brass Knuckles",
    "Golf Club",
    "Nitestick",
    "Knife",
    "Baseball Bat",
    "Showel",
    "Pool Cue",
    "Katana",
    "Chainsaw",
    "Purple Dildo",
    "Small White Dildo",
    "Long White Dildo",
    "Vibrator",
    "Flowers",
    "Cane",
    "Grenade",
    "Tear Gas",
    "Molotov",
    "Vehicle Missile",
    "Hydra Flare",
    "Jetpack",
    "Glock",
    "Silenced Colt",
    "Desert Eagle",
    "Shotgun",
    "Sawn Off",
    "Combat Shotgun",
    "Micro UZI",
    "MP5",
    "AK47",
    "M4",
    "Tec9",
    "Rifle",
    "Sniper Rifle",
    "Rocket Launcher",
    "HS Rocket Launcher",
    "Flamethrower",
    "Minigun",
    "Satchel Charge",
    "Detonator",
    "Spraycan",
    "Fire Extinguisher",
    "Camera",
    "Nightvision",
    "Infrared Vision",
    "Parachute",
    "Fake Pistol"
};
// -----------------------------------------------------------------------------
new GunObjects[47][0] = { // © gimini
    {0},// Emty
    {331},// Brass Knuckles
    {333},// Golf Club
    {334},// Nitestick
    {335},// Knife
    {336},// Baseball Bat
    {337},// Showel
    {338},// Pool Cue
    {339},// Katana
    {341},// Chainsaw
    {321},// Purple Dildo
    {322},// Small White Dildo
    {323},// Long White Dildo
    {324},// Vibrator
    {325},// Flowers
    {326},// Cane
    {342},// Grenade
    {343},// Tear Gas
    {344},// Molotov
    {0},
    {0},
    {0},
    {346},// Glock
    {347},// Silenced Colt
    {348},// Desert Eagle
    {349},// Shotgun
    {350},// Sawn Off
    {351},// Combat Shotgun
    {352},// Micro UZI
    {353},// MP5
    {355},// AK47
    {356},// M4
    {372},// Tec9
    {357},// Rifle
    {358},// Sniper Rifle
    {359},// Rocket Launcher
    {360},// HS Rocket Launcher
    {361},// Flamethrower
    {362},// Minigun
    {363},// Detonator
    {364},// Detonator Button
    {365},// Spraycan
    {366},// Fire Extinguisher
    {367},// Camera
    {368},// Nightvision
    {368},// Infrared Vision
    {371}// Parachute
};


#pragma unused ret_memcpy

new OldWeapon[MAX_PLAYERS];
new HoldingWeapon[MAX_PLAYERS];


enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
    pDeaths,
}
new PlayerInfo[MAX_PLAYERS][pInfo];

main()
{
    print("\n----------------------------------------");
    print(" Civil War TDM by Justsomeguy and Marilem");
    print("----------------------------------\n");
}


public OnGameModeInit()
{
    Textdraw = TextDrawCreate( 1.000000,300.000000,"You died, please wait to be send back to life." );
    TextDrawAlignment( Textdraw, 0 );
    TextDrawBackgroundColor( Textdraw, 0x000000ff );
    TextDrawFont( Textdraw, 0 );
    TextDrawLetterSize( Textdraw, 1.1,4.1 );
    TextDrawColor( Textdraw, COLOR_RED );
    TextDrawSetOutline( Textdraw, 1 );
    TextDrawSetProportional( Textdraw, 1 );
    TextDrawSetShadow( Textdraw, 1 );

    // Don't use these lines if it's a filterscript
    SetGameModeText("Civil war TDM");
    // CHANGE SKINS FOR YOUR TEAMS HERE
    AddPlayerClass(281,1597.8793,-1706.9119,5.8906,48.5541,0,0,0,0,0,0); // NORTH
    AddPlayerClass(280,1597.8793,-1706.9119,5.8906,48.5541,0,0,0,0,0,0); //NORTH
    AddPlayerClass(283,1597.8793,-1706.9119,5.8906,48.5541,0,0,0,0,0,0); //NORTH
    AddPlayerClass(284,1597.8793,-1706.9119,5.8906,48.5541,0,0,0,0,0,0); //NORTH
    AddPlayerClass(285,1597.8793,-1706.9119,5.8906,48.5541,0,0,0,0,0,0); //NORTH

    AddPlayerClass(274,1177.4844,-1323.8638,14.0730,269.5144,0,0,0,0,0,0); //SOUTH
    AddPlayerClass(275,1177.4844,-1323.8638,14.0730,269.5144,0,0,0,0,0,0); //SOUTH
    AddPlayerClass(276,1177.4844,-1323.8638,14.0730,269.5144,0,0,0,0,0,0); //SOUTH
    AddPlayerClass(277,1177.4844,-1323.8638,14.0730,269.5144,0,0,0,0,0,0); //SOUTH
    AddPlayerClass(278,1177.4844,-1323.8638,14.0730,269.5144,0,0,0,0,0,0); //SOUTH
    AddPlayerClass(279,1177.4844,-1323.8638,14.0730,269.5144,0,0,0,0,0,0); //SOUTH

    DisableInteriorEnterExits();

    CreateDynamicObject(9900, -3265.828125, 1618.7138671875, 156.18006896973, 28.49853515625, 359.63195800781, 355.67138671875);
    CreateDynamicObject(9900, -3298.35546875, 1618.646484375, 156.59538269043, 28.4765625, 2.1917724609375, 4.9493408203125);
    CreateDynamicObject(9900, -3331.1540527344, 1611.6060791016, 158.08308410645, 28.4765625, 2.1917724609375, 20.701538085938);
    CreateDynamicObject(9900, -3362.7551269531, 1595.5628662109, 159.53706359863, 28.471069335938, 2.1917724609375, 33.4482421875);
    CreateDynamicObject(9900, -3390.0063476563, 1572.9976806641, 161.0440826416, 28.465576171875, 2.1917724609375, 46.197906494141);
    CreateDynamicObject(9900, -3409.61328125, 1546.4150390625, 162.78192138672, 28.465576171875, 2.1917724609375, 61.19384765625);
    CreateDynamicObject(9900, -3423.4208984375, 1513.3681640625, 164.32147216797, 28.465576171875, 2.1917724609375, 73.19091796875);
    CreateDynamicObject(9900, -3428.4750976563, 1480.994140625, 165.88966369629, 28.465576171875, 2.1917724609375, 90.44091796875);
    CreateDynamicObject(9900, -3421.3100585938, 1447.6096191406, 167.54627990723, 28.482666015625, 359.63214111328, 112.65994262695);
    CreateDynamicObject(9900, -3399.060546875, 1417.0302734375, 165.29559326172, 28.372192382813, 354.51232910156, 136.52160644531);
    CreateDynamicObject(9900, -3365.43359375, 1395.6962890625, 159.52626037598, 28.125, 350.26062011719, 155.02807617188);
    CreateDynamicObject(5004, -3374.9140625, 1462.0126953125, 62.502563476563, 0, 0, 304.59045410156);
    CreateDynamicObject(5004, -3439.9406738281, 1417.1243896484, 62.472026824951, 0, 0, 304.59045410156);
    CreateDynamicObject(5004, -3262.310546875, 1646.8046875, 62.454086303711, 0, 0, 34.491577148438);
    CreateDynamicObject(9900, -3235.3388671875, 1611.552734375, 156.65010070801, 28.493041992188, 359.62646484375, 337.24108886719);
    CreateDynamicObject(9900, -3210.1806640625, 1586.7727050781, 156.88591003418, 28.330505371094, 6.4465026855469, 302.80554199219);
    CreateDynamicObject(9900, -3333.9528808594, 1385.1795654297, 155.59617614746, 28.130493164063, 350.26062011719, 164.78356933594);
    CreateDynamicObject(9900, -3300.607421875, 1380.5390625, 149.81718444824, 28.119506835938, 350.26062011719, 177.52807617188);
    CreateDynamicObject(9900, -3269.361328125, 1380.0572509766, 144.85614013672, 24.421813964844, 350.56896972656, 194.08186340332);
    CreateDynamicObject(9900, -3245.9270019531, 1390.87109375, 126.27600097656, 24.41162109375, 350.56274414063, 214.00305175781);
    CreateDynamicObject(9900, -3228.3679199219, 1413.2817382813, 120.77547454834, 20.705505371094, 350.81484985352, 234.88452148438);
    CreateDynamicObject(9900, -3213.7939453125, 1444.5275878906, 129.50247192383, 21.587432861328, 353.98937988281, 239.83172607422);
    CreateDynamicObject(9900, -3197.38671875, 1469.962890625, 123.94044494629, 24.686279296875, 359.62097167969, 244.94567871094);
    CreateDynamicObject(9900, -3188.5651855469, 1526.5079345703, 131.79272460938, 25.919830322266, 8.7969360351563, 262.6669921875);
    CreateDynamicObject(9900, -3199.033203125, 1554.2076416016, 152.12773132324, 28.184143066406, 8.99267578125, 281.34820556641);
    CreateDynamicObject(9900, -3192.4611816406, 1497.9254150391, 130.53158569336, 23.034210205078, 6.9636840820313, 251.05433654785);
    CreateDynamicObject(5004, -3256.1311035156, 1465.7176513672, 62.436996459961, 0, 0, 244.90374755859);
    CreateDynamicObject(5004, -3215.0424804688, 1573.1607666016, 62.466506958008, 0, 0, 34.491577148438);
    CreateDynamicObject(4585, -3338.0935058594, 1626.7369384766, 143.60903930664, 2.0654296875, 336.73095703125, 111.79138183594);
    CreateDynamicObject(4585, -3267.9150390625, 1637.8466796875, 138.7589263916, 359.99450683594, 336.74194335938, 90.538330078125);
    CreateDynamicObject(4585, -3219.1066894531, 1627.0751953125, 137.07327270508, 359.99450683594, 336.74194335938, 57.429138183594);
    CreateDynamicObject(4585, -3199.8303222656, 1631.3353271484, 102.81979370117, 359.98901367188, 336.74194335938, 54.855133056641);
    CreateDynamicObject(4585, -3184.5812988281, 1580.4510498047, 133.84373474121, 10.136291503906, 337.11499023438, 19.571594238281);
    CreateDynamicObject(4585, -3176.0007324219, 1552.4177246094, 131.6634979248, 5.5206298828125, 337.37622070313, 12.36767578125);
    CreateDynamicObject(4585, -3175.921875, 1517.1427001953, 134.84831237793, 7.9938049316406, 337.36138916016, 355.39047241211);
    CreateDynamicObject(4585, -3186.8986816406, 1467.6931152344, 131.52438354492, 359.66528320313, 340.58624267578, 340.90966796875);
    CreateDynamicObject(4585, -3214.4387207031, 1417.2916259766, 129.82904052734, 354.45733642578, 345.76364135742, 331.37197875977);
    CreateDynamicObject(4585, -3252.5986328125, 1369.8807373047, 138.58592224121, 359.55621337891, 339.82919311523, 289.74563598633);
    CreateDynamicObject(4585, -3304.8562011719, 1361.2133789063, 134.68243408203, 358.86254882813, 338.32525634766, 262.55603027344);
    CreateDynamicObject(4585, -3352.5690917969, 1368.6737060547, 136.21296691895, 358.86975097656, 336.82373046875, 252.771484375);
    CreateDynamicObject(4585, -3403.8041992188, 1392.9222412109, 139.10026550293, 358.86840820313, 336.81884765625, 232.83828735352);
    CreateDynamicObject(4585, -3431.0981445313, 1417.5998535156, 140.74938964844, 358.86840820313, 336.81335449219, 215.79455566406);
    CreateDynamicObject(4585, -3448.9599609375, 1457.9425048828, 141.53979492188, 358.86840820313, 336.81335449219, 192.75456237793);
    CreateDynamicObject(4585, -3449.5466308594, 1497.4223632813, 140.61010742188, 358.86840820313, 336.81335449219, 170.46081542969);
    CreateDynamicObject(4585, -3438.1215820313, 1538.9873046875, 141.47494506836, 358.86840820313, 336.81335449219, 156.09918212891);
    CreateDynamicObject(4585, -3414.6691894531, 1578.5244140625, 143.40841674805, 358.86840820313, 336.81335449219, 144.09375);
    CreateDynamicObject(4585, -3390.76953125, 1603.7669677734, 142.9895324707, 358.86840820313, 336.81335449219, 130.48199462891);
    CreateDynamicObject(4602, -3401.1286621094, 1401.6190185547, 20.159004211426, 0, 0, 134.48260498047);
    CreateDynamicObject(4603, -3181.8278808594, 1463.1654052734, 33.086116790771, 0, 0, 158.38061523438);
    CreateDynamicObject(4602, -3383.0910644531, 1373.8057861328, 20.390029907227, 0, 0, 155.58734130859);
    CreateDynamicObject(4602, -3353.7490234375, 1376.2734375, 20.568532943726, 0, 0, 169.83251953125);
    CreateDynamicObject(4602, -3330.2438964844, 1358.7280273438, 21.33872795105, 0, 0, 168.97296142578);
    CreateDynamicObject(4602, -3303.4826660156, 1372.3123779297, 20.536296844482, 0, 0, 182.68811035156);
    CreateDynamicObject(4585, -3340.9521484375, 1361.0944824219, 128.35124206543, 358.857421875, 338.32397460938, 262.55126953125);


    return 1;
}

public OnGameModeExit()
{
    for(new i=0;i<MAX_PLAYERS;i++)
        if(IsPlayerConnected(i))
            StopPlayerHoldingObject(i);

    if(isLogged[i] == 1) //SAVE ON CRASH/RESTART
    {
    new name[256],check[256];
    Delete3DTextLabel(levl[i]);
    Delete3DTextLabel(admlabl[i]);
    GetPlayerName(i, name, sizeof(name));
    format(check, sizeof(check), "%s.ini", name);
    dini_IntSet(check,"kills", Kills[i]);
    dini_IntSet(check,"deaths", Deaths[i]);
    dini_IntSet(check,"money", GetPlayerMoney(i));
    dini_IntSet(check,"skill_deagle", Deagle[i]);
    dini_IntSet(check,"skill_shotgun", Shotgun[i]);
    dini_IntSet(check,"skill_spas", Spas[i]);
    dini_IntSet(check,"skill_mp5", MP5[i]);
    dini_IntSet(check,"skill_ak", Ak47[i]);
    dini_IntSet(check,"skill_m4", M4[i]);
    dini_IntSet(check,"skill_sniper", Sniper[i]);
    dini_IntSet(check,"SkillPoints", SkillPoints[i]);
    }
    }
    TextDrawDestroy(Textdraw);
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1867.2502,-1362.7205,19.1406);
    SetPlayerCameraPos(playerid, 1872.0940,-1362.6853,19.1406);
    SetPlayerCameraLookAt(playerid, 1867.2502,-1362.7205,19.1406);
    SetPlayerFacingAngle(playerid, 268.1415);
    //CHANGE TEAM NAMES HERE
    if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4)
      {
      gTeam[playerid] = LSPD;
      GameTextForPlayer(playerid, "LSPD", 1000, 3);
      }
    else if(classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9 || classid == 10)
      {
      gTeam[playerid] = EMS;
      GameTextForPlayer(playerid, "EMS", 1000, 3);
      }
    return 1;
}

public OnPlayerConnect(playerid)
{
    Purgotary[playerid] = 0;

    new string[64], pName[MAX_PLAYER_NAME], string2[64];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof(string),"Player %s has been connected",pName);
    format(string2, sizeof(string2), "%s.ini", pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
    SendClientMessage(playerid, 0xFFFFFFAA, "Welcome to TDM Advanced mod by rockstar (not Rockstar Games)"); //Write your MOTD here
    isLogged[playerid] = 0;
    Admin[playerid] = 0;
    Level[playerid] = 0;
    Deaths[playerid] = 0;
    Kills[playerid] = 0;
    SkillPoints[playerid] = 0;
    if(!dini_Exists(string2))
    {
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register new account", "Account with this name is not registred!\nType your new password here:", "Register", "Exit");
    }
    else ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Log in your account", "This account is registred!\nType your password below:", "Login", "Exit");
}
    GameTextForPlayer(playerid," ~Y~welcome to ~B~Civil War ~R~TDM", 25, 1000);
    OldWeapon[playerid]=0;
    HoldingWeapon[playerid]=0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new string[64], name[MAX_PLAYER_NAME], check[256];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"Player %s left the server(game crash)",name);
        case 1: format(string,sizeof string,"Player %s left the server",name);
    }
    SendClientMessageToAll(0x757575AA,string);
    format(check, sizeof(check), "%s.ini", name);
    new cash;
    cash = GetPlayerMoney(playerid);
    if(isLogged[playerid] == 1)
    {
    dini_IntSet(check,"kills", Kills[playerid]);
    dini_IntSet(check,"deaths", Deaths[playerid]);
    dini_IntSet(check,"money", cash);
    dini_IntSet(check,"skill_deagle", Deagle[playerid]);
    dini_IntSet(check,"skill_shotgun", Shotgun[playerid]);
    dini_IntSet(check,"skill_spas", Spas[playerid]);
    dini_IntSet(check,"skill_mp5", MP5[playerid]);
    dini_IntSet(check,"skill_ak", Ak47[playerid]);
    dini_IntSet(check,"skill_m4", M4[playerid]);
    dini_IntSet(check,"skill_sniper", Sniper[playerid]);
    dini_IntSet(check,"SkillPoints", SkillPoints[playerid]);
    }

    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/dropgun", true) == 0 || strcmp(cmd, "/dgun", true) == 0)
    {
        new gunID = GetPlayerWeapon(playerid);
        new gunAmmo = GetPlayerAmmo(playerid);
        if(gunID != 0 && gunAmmo != 0)
        {
            new f = MAX_OBJ+1;
            for(new a = 0; a < sizeof(ObjCoords); a++)
            {
                if(ObjCoords[a][0] == 0.0)
                {
                    f = a;
                    break;
                }
            }
            if(f > MAX_OBJ) return SendClientMessage(playerid, 0x33AA3300, "You can not throw weapons at the moment, try back later!!");
            new gunname[25];
            new buffer[100];
            GetWeaponNameEx(gunID, gunname, sizeof(gunname));
            format(buffer, sizeof(buffer), "You threw %s", gunname);
            SendClientMessage(playerid, 0x33AA3300, buffer);
            RemovePlayerWeapon(playerid, gunID);
            ObjectID[f][0] = gunID;
            ObjectID[f][1] = gunAmmo;
            GetPlayerPos(playerid, ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]);
            object[f] = CreateDynamicObject(GunObjects[gunID][0],ObjCoords[f][0],ObjCoords[f][1],ObjCoords[f][2]-1,93.7,120.0,120.0);
            return 1;
        }
    }
    if(strcmp(cmd, "/pickupgun", true) == 0 || strcmp(cmd, "/pgun", true) == 0)
    {
        new f = MAX_OBJ+1;
        for(new a = 0; a < sizeof(ObjCoords); a++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 5.0, ObjCoords[a][0], ObjCoords[a][1], ObjCoords[a][2]))
            {
                f = a;
                break;
            }
        }
        if(f > MAX_OBJ) return SendClientMessage(playerid, 0x33AA3300, "You are not near the weapon which you can pick up!");
        else
        {
            new gunname[25];
            new buffer[100];

            ObjCoords[f][0] = 0.0;
            ObjCoords[f][1] = 0.0;
            ObjCoords[f][2] = 0.0;

            DestroyObject(object[f]);
            GivePlayerWeapon(playerid, ObjectID[f][0], ObjectID[f][1]);
            GetWeaponNameEx(ObjectID[f][0], gunname, sizeof(gunname));
            format(buffer, sizeof(buffer), "You picked up %s", gunname);
            SendClientMessage(playerid, 0x33AA3300, buffer);
        }
        return 1;
    }
    if (strcmp("/Goodbyecruelworld!", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid, 0);
        return 1;
    }
    if (strcmp("/Heal", cmdtext, true, 10) == 0)
    {
        GetPlayerMoney( 2000);
        SetPlayerHealth(playerid, 100);
        return 1;
    }
    if (strcmp("/Buyarmor", cmdtext, true, 10) == 0)
    {
        GetPlayerMoney( 4200);
        SetPlayerArmour(playerid, 1000);
        return 1;
    }
    if(strcmp("/stats", cmdtext, true) == 0)
    {
    new name[24], check[258], stats[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(check, sizeof(check), "%s.ini", name);
        if(dini_Exists(check))
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "____________STATS___________");
                format(stats, sizeof(stats), "Money: [%i$] Kills: [%i] Deaths: [%i]\nLevel: [%i] Admin Level: [%i] Warns: [%i]", GetPlayerMoney(playerid), Kills[playerid], Deaths[playerid], Level[playerid], Admin[playerid], Warns[playerid]);
                SendClientMessage(playerid, 0xFFFFFFAA, stats);
            }
        return 1;
    }
    if(strcmp("/pm", cmd, true) == 0)
    {
        new messagavic[256], messagame[256], pname[24], vname[24];
        tmp = strtok(cmdtext, idx);
        GetPlayerName(playerid, pname, sizeof(pname));
        GetPlayerName(strval(tmp), vname, sizeof(vname));
        if(strval(tmp) > 9)
        {
        format(messagavic, sizeof(messagavic), "PM from %s(%i): %s", pname ,playerid, cmdtext[6]);
        format(messagame, sizeof(messagame), "PM for %s(%i): %s", vname, strval(tmp), cmdtext[6]);
        }
        else
        {
        format(messagavic, sizeof(messagavic), "PM from %s(%i): %s", pname,playerid, cmdtext[5]);
        format(messagame, sizeof(messagame), "PM for %s(%i): %s", vname, strval(tmp), cmdtext[5]);
        }
        if(!strlen(tmp))
        {
        SCM(playerid, 0xFFFFFFAA, "USAGE: /pm [id] [message]");
        }
        else
        {
        SCM(strval(tmp), 0xFFFF00AA, messagavic);
        SCM(playerid, 0xE1E100AA, messagame);
        }
        return 1;
    }

    if(strcmp("/help", cmd, true) == 0)
    {
        SCM(playerid, 0xFFFFFFAA, "____________HELP______________");
        SCM(playerid, 0xFFFFFFAA, "/stats - your statistic.");
        SCM(playerid, 0xFFFFFFAA, "/pm [ID] [text] - personal message.");
        SCM(playerid, 0xFFFFFFAA, "![text] - team chat.");
        SCM(playerid, 0xFFFFFFAA, "/credits - Authors of the mode.");
        return 1;
    }
    return 0;
}
stock SetPlayerMoney(playerid, money)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, money);
return;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
    if(dialogid == 1) //register
    {
                new name[24], check[258];
                GetPlayerName(playerid, name, sizeof(name));
                format(check, sizeof(check), "%s.ini", name);
                dini_Create(check);
                dini_Set(check,"password", inputtext);
                dini_IntSet(check,"money", 0);
                dini_IntSet(check,"kills", 0);
                dini_IntSet(check,"deaths", 0);
                dini_IntSet(check,"level", 0);
                dini_IntSet(check,"admin", 0);
                dini_IntSet(check,"warns", 0);
                dini_IntSet(check,"skill_deagle", 0);
                dini_IntSet(check,"skill_shotgun", 0);
                dini_IntSet(check,"skill_spas", 0);
                dini_IntSet(check,"skill_mp5", 0);
                dini_IntSet(check,"skill_ak", 0);
                dini_IntSet(check,"skill_m4", 0);
                dini_IntSet(check,"skill_sniper", 0);
                dini_IntSet(check,"SkillPoints", 0);
                SendClientMessage(playerid, 0xFFFFFFAA, "Account registered! You logged in automatically!");
                isLogged[playerid] = 1;
        return 1;
    }
    if(dialogid == 2) //login
    {
        new name[24], check[258];
        GetPlayerName(playerid, name, sizeof(name));
        format(check, sizeof(check), "%s.ini", name);
        if(dini_Exists(check))
        {
        if(!strlen(inputtext))
        {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Log in your account", "Bad password!\nType your password below:", "Login", "Exit");
        }
        else
        {
        if(strcmp(inputtext, dini_Get(check, "password"), false) == 0)
                {
                    isLogged[playerid] = 1;
                    SCM(playerid, 0xFFFFFFAA, "You succesfully logged in!");
                    SetPlayerMoney(playerid, dini_Int(check, "money"));
                    SetPlayerScore(playerid, dini_Int(check, "kills"));
                    Kills[playerid] = dini_Int(check, "kills");
                    Deaths[playerid] = dini_Int(check, "deaths");
                    Level[playerid] = dini_Int(check, "level");
                    Admin[playerid] = dini_Int(check, "admin");
                    Warns[playerid] = dini_Int(check, "warns");
                    SkillPoints[playerid] = dini_Int(check, "SkillPoints");
                    Deagle[playerid] = dini_Int(check,"skill_deagle");
                    Shotgun[playerid] = dini_Int(check,"skill_shotgun");
                    Spas[playerid] = dini_Int(check,"skill_spas");
                    MP5[playerid] = dini_Int(check,"skill_mp5");
                    Ak47[playerid] = dini_Int(check,"skill_ak");
                    M4[playerid] = dini_Int(check,"skill_m4");
                    Sniper[playerid] = dini_Int(check,"skill_sniper");
                }
                else ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Log in your account", "Bad password!\nType your password below:", "Войти", "Выйти");
        }
        }
        else
        {
        SCM(playerid, 0xFF0000AA, "FATAL ERROR: UNKNOWN ERROR 1");
        Kick(playerid);
        }
        return 1;
    }
}
else
{
    if(dialogid == 1) //register
    {
    Kick(playerid);
    }
    if(dialogid == 2)
    {
    Kick(playerid);
    }
    if(dialogid == 3)
    ///     WARNING! I SCRAPPED THE SKILL SYSTEM. YOU CAN ACTIVATE IT BY REMOVING THE "/^ ^/"
    if(dialogid == 4) //Deagle edit
    {
        if(Deagle[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFF0000AA, "You dont have that amount of skill points!");
        }
        else
        {
            Deagle[playerid] = Deagle[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }
    if(dialogid == 5) //Shotgun edit
    {
        if(Shotgun[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFF0000AA, "You dont have that amount of skill points!");
        }
        else
        {
            Shotgun[playerid] = Shotgun[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }
    if(dialogid == 6) //Spas edit
    {
        if(Spas[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFF0000AA, "You dont have that amount of skill points!");
        }
        else
        {
            Spas[playerid] = Spas[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }
    if(dialogid == 7) //mp5 edit
    {
        if(MP5[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFF0000AA, "You dont have that amount of skill points!");
        }
        else
        {
            MP5[playerid] = MP5[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }
    if(dialogid == 8) //ak47 edit
    {
        if(Ak47[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFF0000AA, "You dont have that amount of skill points!");
        }
        else
        {
            Ak47[playerid] = Ak47[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }
    if(dialogid == 9) //m4 edit
    {
        if(M4[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFF0000AA, "You dont have that amount of skill points!");
        }
        else
        {
            M4[playerid] = M4[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }
    if(dialogid == 10) //Sniper edit
    {
        if(Sniper[playerid] < strval(inputtext))
        {
            SCM(playerid, 0xFFFFFFAA, "You dont have that amount of skill points!");
        }
        else
        {
            Sniper[playerid] = Sniper[playerid]-strval(inputtext);
            SkillPoints[playerid] = SkillPoints[playerid]+strval(inputtext);
            SCM(playerid, 0xFFFFFFAA, "Skill's changed!");
        }
    }

}
    return 0;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate==PLAYER_STATE_ONFOOT)
    {
        StopPlayerHoldingObject(playerid);
        OldWeapon[playerid]=0;
        HoldingWeapon[playerid]=0;
    }
    return 1;
}

public OnPlayerUpdate(playerid)
{
    if(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT)
    {
        new weaponid=GetPlayerWeapon(playerid),oldweapontype=GetWeaponType(OldWeapon[playerid]);
        new weapontype=GetWeaponType(weaponid);
        if(HoldingWeapon[playerid]==weaponid)
            StopPlayerHoldingObject(playerid);

        if(OldWeapon[playerid]!=weaponid)
        {
            new modelid=GetWeaponModel(OldWeapon[playerid]);
            if(modelid!=0 && oldweapontype!=WEAPON_TYPE_NONE && oldweapontype!=weapontype)
            {
                HoldingWeapon[playerid]=OldWeapon[playerid];
                switch(oldweapontype)
                {
                    case WEAPON_TYPE_LIGHT:
                        SetPlayerHoldingObject(playerid, modelid, 8,0.0,-0.1,0.15, -100.0, 0.0, 0.0);

                    case WEAPON_TYPE_MELEE:
                        SetPlayerHoldingObject(playerid, modelid, 7,0.0,0.0,-0.18, 100.0, 45.0, 0.0);

                    case WEAPON_TYPE_HEAVY:
                        SetPlayerHoldingObject(playerid, modelid, 1, 0.2,-0.125,-0.1,0.0,25.0,180.0);
                }
            }
        }

        if(oldweapontype!=weapontype)
            OldWeapon[playerid]=weaponid;
    }
    return 1;
}

//------------------------------------------------------------------------------------------------------

GetWeaponType(weaponid)
{
    switch(weaponid)
    {
        case 22,23,24,26,28,32:
            return WEAPON_TYPE_LIGHT;

        case 3,4,16,17,18,39,10,11,12,13,14,40,41:
            return WEAPON_TYPE_MELEE;

        case 2,5,6,7,8,9,25,27,29,30,31,33,34,35,36,37,38:
            return WEAPON_TYPE_HEAVY;
    }
    return WEAPON_TYPE_NONE;
}

stock GetWeaponModel(weaponid)
{
    switch(weaponid)
    {
        case 1:
            return 331;

        case 2..8:
            return weaponid+331;

        case 9:
            return 341;

        case 10..15:
            return weaponid+311;

        case 16..18:
            return weaponid+326;

        case 22..29:
            return weaponid+324;

        case 30,31:
            return weaponid+325;

        case 32:
            return 372;

        case 33..45:
            return weaponid+324;

        case 46:
            return 371;
    }
    return 0;
}
stock GetWeaponNameEx(id, name[], len) return format(name,len, "%s", GunNames[id]);

stock RemovePlayerWeapon(playerid, weaponid);
public RemovePlayerWeapon(playerid, weaponid)
{ // Not mine :3
    new plyWeapons[12] = 0;
    new plyAmmo[12] = 0;
    for(new sslot = 0; sslot != 12; sslot++)
    {
        new wep, ammo;
        GetPlayerWeaponData(playerid, sslot, wep, ammo);
        if(wep != weaponid && ammo != 0) GetPlayerWeaponData(playerid, sslot, plyWeapons[sslot], plyAmmo[sslot]);
    }
    ResetPlayerWeapons(playerid);
    for(new sslot = 0; sslot != 12; sslot++)
    {
        if(plyAmmo[sslot] != 0) GivePlayerWeapon(playerid, plyWeapons[sslot], plyAmmo[sslot]);
    }
    return 1;
}
public purgotary(playerid)
{
    Purgotary[playerid] = 0;
    SetPlayerDrunkLevel(playerid, 0);
    SpawnPlayer(playerid);
    SetCameraBehindPlayer(playerid);
    TextDrawHideForPlayer(playerid, Textdraw);
    TogglePlayerControllable(playerid, 1);
    return 1;
}
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == LSPD) SetPlayerColor(playerid, 0x0000FFAA);
    else if(gTeam[playerid] == EMS) SetPlayerColor(playerid, 0xFF0000AA);
    SetPlayerHealth(playerid, 99999);
    SetTimerEx("AntiSpawnKill", 3000, 0, "i%", playerid);

    if(Purgotary[playerid] == 1)
    {
        SetPlayerCameraPos(playerid, -833.5241,-1358.8575,86.9054);
        SetPlayerCameraLookAt(playerid, -833.5241,-1358.8575,0);
        SetPlayerDrunkLevel (playerid, 100000);
        SetPlayerPos(playerid, 1047.5898,2921.8098,43.0475);
        TextDrawShowForPlayer(playerid, Text:Textdraw);
        SetTimerEx("purgotary", 10000, false, "i", playerid);
        TogglePlayerControllable(playerid, 0);
    }
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
       if(gTeam[killerid] == gTeam[playerid])
       {
            SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
            new name[MAX_PLAYER_NAME], string[44];
            GetPlayerName(killerid, name, sizeof(name));
            format(string,sizeof(string),"Team killing is not allowed!",name);
            SendClientMessage(killerid, 0xFFFFFFAA, string);
       }
       else
       {
         GivePlayerMoney(killerid, 1000);
         SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
         Kills[killerid]++;
         Deaths[playerid]++;
       }
    SendDeathMessage(killerid, playerid, reason);
    Purgotary[playerid] = 1;
    return 1;
}
But when i compile it i get these errors:
Код:
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(280) : error 017: undefined symbol "i"
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(283) : error 017: undefined symbol "levl"
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(283) : error 017: undefined symbol "i"
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(283) : error 029: invalid expression, assumed zero
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(283) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Can anyone help me?


Re: Errors in my register system. - Biesmen - 08.05.2011

Could you post the piece of script of line 280 and 283? (Not just the line, that whole piece of script).
Also tell us where those lines are.


Re: Errors in my register system. - trapped1 - 08.05.2011

define simbols!


Re: Errors in my register system. - justsomeguy - 08.05.2011

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
Could you post the piece of script of line 280 and 283? (Not just the line, that whole piece of script).
Also tell us where those lines are.
Wellthis is the part where the script saves everyone's stats when crashinh/restarting

pawn Код:
public OnGameModeExit()
{
    for(new i=0;i<MAX_PLAYERS;i++)
        if(IsPlayerConnected(i))
            StopPlayerHoldingObject(i);

    if(isLogged[i] == 1) //SAVE ON CRASH/RESTART
    {
    new name[256],check[256];
    Delete3DTextLabel(levl[i]);
    Delete3DTextLabel(admlabl[i]);
    GetPlayerName(i, name, sizeof(name));
    format(check, sizeof(check), "%s.ini", name);
    dini_IntSet(check,"kills", Kills[i]);
    dini_IntSet(check,"deaths", Deaths[i]);
    dini_IntSet(check,"money", GetPlayerMoney(i));
    dini_IntSet(check,"skill_deagle", Deagle[i]);
    dini_IntSet(check,"skill_shotgun", Shotgun[i]);
    dini_IntSet(check,"skill_spas", Spas[i]);
    dini_IntSet(check,"skill_mp5", MP5[i]);
    dini_IntSet(check,"skill_ak", Ak47[i]);
    dini_IntSet(check,"skill_m4", M4[i]);
    dini_IntSet(check,"skill_sniper", Sniper[i]);
    dini_IntSet(check,"SkillPoints", SkillPoints[i]);
    }
    }
    TextDrawDestroy(Textdraw);
    return 1;
}
ps:
Didnt knew you script8D


Re: Errors in my register system. - Biesmen - 08.05.2011

pawn Код:
public OnGameModeExit()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            StopPlayerHoldingObject(i);

            if(isLogged[i] == 1)
            {
                new name[256], check[256];
                Delete3DTextLabel(levl[i]); // levl is not defined, maybe it's level?
                Delete3DTextLabel(admlabl[i]);
                GetPlayerName(i, name, sizeof(name));
                format(check, sizeof(check), "%s.ini", name);
                dini_IntSet(check,"kills", Kills[i]);
                dini_IntSet(check,"deaths", Deaths[i]);
                dini_IntSet(check,"money", GetPlayerMoney(i));
                dini_IntSet(check,"skill_deagle", Deagle[i]);
                dini_IntSet(check,"skill_shotgun", Shotgun[i]);
                dini_IntSet(check,"skill_spas", Spas[i]);
                dini_IntSet(check,"skill_mp5", MP5[i]);
                dini_IntSet(check,"skill_ak", Ak47[i]);
                dini_IntSet(check,"skill_m4", M4[i]);
                dini_IntSet(check,"skill_sniper", Sniper[i]);
                dini_IntSet(check,"SkillPoints", SkillPoints[i]);
                }
            }  
    }
    TextDrawDestroy(Textdraw);
    return 1;
}

But I suggest you to use something like this:
pawn Код:
stock SavePlayerData()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            StopPlayerHoldingObject(i);

            if(isLogged[i] == 1)
            {
                new name[256], check[256];
                Delete3DTextLabel(levl[i]); // levl is not defined, maybe it's level?
                Delete3DTextLabel(admlabl[i]);
                GetPlayerName(i, name, sizeof(name));
                format(check, sizeof(check), "%s.ini", name);
                dini_IntSet(check,"kills", Kills[i]);
                dini_IntSet(check,"deaths", Deaths[i]);
                dini_IntSet(check,"money", GetPlayerMoney(i));
                dini_IntSet(check,"skill_deagle", Deagle[i]);
                dini_IntSet(check,"skill_shotgun", Shotgun[i]);
                dini_IntSet(check,"skill_spas", Spas[i]);
                dini_IntSet(check,"skill_mp5", MP5[i]);
                dini_IntSet(check,"skill_ak", Ak47[i]);
                dini_IntSet(check,"skill_m4", M4[i]);
                dini_IntSet(check,"skill_sniper", Sniper[i]);
                dini_IntSet(check,"SkillPoints", SkillPoints[i]);
                }
            }  
    }
    TextDrawDestroy(Textdraw);
    return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/saveplayers", true) == 0)
    {
        SavePlayerData()
        return 1;
    }
    return 0;
}
If you typed /saveplayers, turn off the server.


Re: Errors in my register system. - MadeMan - 08.05.2011

You already have a thread about it

https://sampforum.blast.hk/showthread.php?tid=253725


Re: Errors in my register system. - justsomeguy - 08.05.2011

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
pawn Код:
public OnGameModeExit()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            StopPlayerHoldingObject(i);

            if(isLogged[i] == 1)
            {
                new name[256], check[256];
                Delete3DTextLabel(levl[i]); // levl is not defined, maybe it's level?
                Delete3DTextLabel(admlabl[i]);
                GetPlayerName(i, name, sizeof(name));
                format(check, sizeof(check), "%s.ini", name);
                dini_IntSet(check,"kills", Kills[i]);
                dini_IntSet(check,"deaths", Deaths[i]);
                dini_IntSet(check,"money", GetPlayerMoney(i));
                dini_IntSet(check,"skill_deagle", Deagle[i]);
                dini_IntSet(check,"skill_shotgun", Shotgun[i]);
                dini_IntSet(check,"skill_spas", Spas[i]);
                dini_IntSet(check,"skill_mp5", MP5[i]);
                dini_IntSet(check,"skill_ak", Ak47[i]);
                dini_IntSet(check,"skill_m4", M4[i]);
                dini_IntSet(check,"skill_sniper", Sniper[i]);
                dini_IntSet(check,"SkillPoints", SkillPoints[i]);
                }
            }  
    }
    TextDrawDestroy(Textdraw);
    return 1;
}

But I suggest you to use something like this:
pawn Код:
stock SavePlayerData()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            StopPlayerHoldingObject(i);

            if(isLogged[i] == 1)
            {
                new name[256], check[256];
                Delete3DTextLabel(levl[i]); // levl is not defined, maybe it's level?
                Delete3DTextLabel(admlabl[i]);
                GetPlayerName(i, name, sizeof(name));
                format(check, sizeof(check), "%s.ini", name);
                dini_IntSet(check,"kills", Kills[i]);
                dini_IntSet(check,"deaths", Deaths[i]);
                dini_IntSet(check,"money", GetPlayerMoney(i));
                dini_IntSet(check,"skill_deagle", Deagle[i]);
                dini_IntSet(check,"skill_shotgun", Shotgun[i]);
                dini_IntSet(check,"skill_spas", Spas[i]);
                dini_IntSet(check,"skill_mp5", MP5[i]);
                dini_IntSet(check,"skill_ak", Ak47[i]);
                dini_IntSet(check,"skill_m4", M4[i]);
                dini_IntSet(check,"skill_sniper", Sniper[i]);
                dini_IntSet(check,"SkillPoints", SkillPoints[i]);
                }
            }  
    }
    TextDrawDestroy(Textdraw);
    return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/saveplayers", true) == 0)
    {
        SavePlayerData()
        return 1;
    }
    return 0;
}
If you typed /saveplayers, turn off the server.
Hm getting these errors:
Код:
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(281) : error 029: invalid expression, assumed zero
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(281) : error 017: undefined symbol "SavePlayerData"
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(292) : error 017: undefined symbol "levl"
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(292) : warning 215: expression has no effect
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(292) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(292) : error 029: invalid expression, assumed zero
C:\Documents and Settings\brian\Mijn documenten\Downloads\GTA San Andreas\gamemodes\Civil-War-TDM.pwn(292) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
on these lines:
pawn Код:
stock SavePlayerData()
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            StopPlayerHoldingObject(i);

            if(isLogged[i] == 1)
            {
                new name[256], check[256];



Re: Errors in my register system. - Elka_Blazer - 08.05.2011

Please give me the lines .... 275-284

And by the way .... your script is really really reallllllllly bad.

or it is just the way you work,without enums.




Re: Errors in my register system. - justsomeguy - 08.05.2011

Quote:
Originally Posted by Elka_Blazer
Посмотреть сообщение
Please give me the lines .... 275-284

And by the way .... your script is really really reallllllllly bad.

or it is just the way you work,without enums.

First: the lines are:
pawn Код:
return 1;
}

public OnGameModeExit()
{
stock SavePlayerData()
{
    for(new i=0;i<MAX_PLAYERS;i++)
Second: /care
I just started out making this gm+i only know the basics sow again: /care


Re: Errors in my register system. - justsomeguy - 09.05.2011

bmup