Script Optimization?
#6

kk.

under OnPlayerConnect
pawn Код:
SetPVarInt(playerid, "Ip", IP);
it says that arguement 3 is mismatched. heres the whole onplayerconnect:
pawn Код:
public OnPlayerConnect(playerid)
{
    CountPlayersOnline(); //counts and prints the # of players online
    SendConnectMessage(playerid); //sends the connect message
    UsePlayerPedAnims(); //use player ped anims
    GameTextForPlayer(playerid,"~R~PARTY TIME",3000,4); //game text
    SendDeathMessage(playerid, INVALID_PLAYER_ID, 200);
    AntiDeAMX(); //anti de-amx
   
    new pname[128];
    new file[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), savefolder,pname);
    new IP[16];
    GetPlayerIp(playerid, IP, sizeof(IP));
    if(!dini_Exists(file))
    {
        dini_Create(file);
        dini_Set(file, "Ip", IP);
        SetPVarInt(playerid, "Ip", IP);
        dini_IntSet(file, "Score", 0);
        dini_IntSet(file, "Money", 0);
        dini_IntSet(file, "Kills", Killz[playerid]);
        dini_IntSet(file, "Deaths", Deathz[playerid]);
        SetPlayerScore(playerid, dini_Int(file, "Score"));
        SetPlayerMoney(playerid, dini_Int(file, "Money"));

    }
    else
    {
        new tmp;
        tmp = dini_Int(file, "Ip");
        if(tmp == GetPVarInt(playerid, "IP"))
        {
            SetPlayerScore(playerid, dini_Int(file, "Score"));
            SetPlayerMoney(playerid, dini_Int(file, "Money"));
        }
        else
        {
            new string[128];
            format(string, sizeof(string), "YOu arent the real %s, GTFO!", pname);
            SendClientMessage(playerid, COLOR_RED, string);
            Kick(playerid);
        }
    }
    return 1;
}
that code is a tiny bit updated.
Reply


Messages In This Thread
Script Optimization? - by sciman001 - 15.04.2011, 23:18
Re: Script Optimization? - by sciman001 - 16.04.2011, 00:38
Re: Script Optimization? - by admantis - 16.04.2011, 00:42
Re: Script Optimization? - by sciman001 - 16.04.2011, 00:53
Re: Script Optimization? - by admantis - 16.04.2011, 01:01
Re: Script Optimization? - by sciman001 - 16.04.2011, 01:04
Re: Script Optimization? - by admantis - 16.04.2011, 01:08
Re: Script Optimization? - by sciman001 - 16.04.2011, 01:32
Re: Script Optimization? - by Donya - 16.04.2011, 01:34
Re: Script Optimization? - by sciman001 - 16.04.2011, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)