I need a little help
#1

where can i find a tut that give helps me get a register with a dialog that save stats and money and thing
Reply
#2

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <dini>
#include <dudb>

#pragma unused ret_memcpy

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF
#define SERVER_USER_FILE "myserver/%s.ini"


enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
}

new PlayerInfo[MAX_PLAYERS][pInfo];
new gPlayerLogged[MAX_PLAYERS];



main()
{
    print("\n----------------------------------");
    print(" ***************************************");
    print(" * Made by: Mike Kenny Thanks to SAMP *");
    print(" ***************************************");
    print("----------------------------------\n");
}


public OnGameModeInit()
{
    //Classes
    SetGameModeText("LSRP");
    //Cars
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddStaticVehicle(597,1600.4298,-1699.9374,5.6602,88.3738,0,1); // lspd acr
    AddStaticVehicle(597,1600.0916,-1704.2042,5.6581,91.1555,0,1); // lspd car
    AddStaticVehicle(597,1600.4170,-1695.7987,5.6592,87.4965,0,1); // lspd
    AddStaticVehicle(597,1600.3844,-1691.9567,5.6592,86.8277,0,1); // lspd car
    AddStaticVehicle(597,1600.3899,-1687.7124,5.6591,89.3547,0,1); // lspdcar
    AddStaticVehicle(597,1600.4153,-1683.7084,5.6590,90.9273,0,1); // lspd car
    AddStaticVehicle(599,1586.7186,-1667.8356,6.0822,270.5943,0,1); // lspd jeep
    AddStaticVehicle(599,1586.7808,-1672.0300,6.0840,273.2832,0,1); // lspd jeep
    AddStaticVehicle(596,1595.0616,-1709.9613,5.6114,2.8834,0,1); // lspd car
    AddStaticVehicle(596,1582.8510,-1709.5516,5.6118,358.9179,0,1); // lspd car
    AddStaticVehicle(596,1587.4099,-1709.6079,5.6100,358.5466,0,1); // lspd
    AddStaticVehicle(596,1591.5608,-1709.9576,5.6121,0.2256,0,1); // lspd car
    AddStaticVehicle(523,1557.7510,-1692.4803,5.4612,183.1004,0,0); // lspd bike
    AddStaticVehicle(523,1560.0299,-1692.3705,5.4616,192.9220,0,0); // lspd bike
    AddStaticVehicle(523,1562.4655,-1692.6902,5.4624,183.0608,0,0); // lspd bike
    AddStaticVehicle(523,1566.6022,-1692.8267,5.4657,176.4076,0,0); // lspd bike
    AddStaticVehicle(523,1569.4564,-1693.1102,5.4576,183.3335,0,0); // lspd bike
    AddStaticVehicle(523,1571.6915,-1692.5530,5.4631,175.7829,0,0); // lspd bike
    AddStaticVehicle(523,1567.8903,-1694.7417,5.4618,179.9420,0,0); // lspd bike
    AddStaticVehicle(523,1559.4923,-1694.9128,5.4672,185.2602,0,0); // lspd bike
    AddStaticVehicle(523,1561.5569,-1695.0684,5.4690,182.1873,0,0); // lspd bike
    AddStaticVehicle(523,1570.4985,-1694.6296,5.4622,179.6350,0,0); // lspd bike
    AddStaticVehicle(427,1526.6949,-1644.2720,6.0225,359.2609,0,1); // lspd bus
    AddStaticVehicle(427,1530.7813,-1644.2168,6.0225,1.2594,0,1); // lspd bus
    AddStaticVehicle(427,1534.5864,-1644.2166,6.0225,359.0846,0,1); // lspd bus
    AddStaticVehicle(427,1538.6324,-1644.3546,6.0227,3.0936,0,1); // lspd bus
    AddStaticVehicle(599,1578.0944,-1709.8160,6.0833,356.9764,0,1); // lspd jeep
    AddStaticVehicle(599,1574.3987,-1709.8578,6.0773,358.8053,0,1); // lspd jeep
    AddStaticVehicle(599,1558.2621,-1710.4803,6.0803,358.3495,0,1); // lspd jeep
    AddStaticVehicle(599,1563.5830,-1712.0769,6.0767,358.9062,0,1); // lspd jeep
    AddStaticVehicle(599,1569.8381,-1709.7291,6.0719,0.2660,0,1); // lspd jeep
    AddStaticVehicle(596,1529.5768,-1688.2301,5.6116,269.4020,0,1); // lspd car
    AddStaticVehicle(596,1529.6230,-1683.7524,5.6117,271.4269,0,1); // lspd car
    AddStaticVehicle(528,1546.6086,-1651.8315,5.9341,270.0079,0,0); // sapd
    AddStaticVehicle(528,1546.6479,-1655.4368,5.9345,274.3246,0,0); // sapd
    AddStaticVehicle(528,1546.1361,-1659.0414,5.9334,266.9852,0,0); // sapd
    AddStaticVehicle(528,1546.6769,-1663.4353,5.9338,272.1964,0,0); // sapd
    AddStaticVehicle(490,1497.4235,-1487.3599,13.6754,184.3188,0,0); // fbi jeep
    AddStaticVehicle(490,1501.6923,-1487.7146,13.6796,176.3898,0,0); // fbi jeep
    AddStaticVehicle(490,1505.2539,-1487.5974,13.6802,174.2703,0,0); // fbi jeep
    AddStaticVehicle(490,1509.1785,-1488.0520,13.6803,174.0237,0,0); // fbi jeep
    AddStaticVehicle(490,1512.4803,-1488.2592,13.6816,180.5317,0,0); // fbi jeep
    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)
{
    gPlayerLogged[playerid] = 0;
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if (!dini_Exists(file))
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi your not registered", "Welcome, your not registered mate, input your registration pw below", "Register", "Leave");
    }
    if(fexist(file))
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi your registered", "Fucken awesome mate, your registered :D. Inpute your pw below", "Login", "Leave");
    }

    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if(gPlayerLogged[playerid] == 1)
    {
        dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
        dini_IntSet(file, "Money", PlayerInfo[playerid][pCash]);
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    }
    gPlayerLogged[playerid] = 0;
    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("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage, COLOR_YELLOW,"(Server) /rules /stats /changepass /pay /buy /pm /admins /report
        SendClientMessage, COLOR_YELLOW,"
(Server) /(ah)adminhelp /Info
        return 1;

        public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage, COLOR_YELLOW,"(Server) /rules /stats /changepass /pay /buy /pm /admins /report
  SendClientMessage, COLOR_YELLOW,"
(Server) /(ah)adminhelp /Info
        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;
}
need help witht hose errors
Reply
#3

First
its not
return 1;
}
_______
}
return 1;

This is the big error i dont see more
Reply
#4

Search the filterscript section there are plenty there.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)