Posts by [HiC]TheKiller

    Why do you need to loop through MAX_VEHICLES? Try doing the following instead

    pawn Код:

    new vehicleid = GetPlayerVehicleID(playerid);for(new i = 0; i < 8; i++){    if(vehicleid == pizzaboy[i])     {    //Do stuff    SendClientMessage(playerid,COLOR_WHITE,Pizzaboy w00t);    } }

    You'll still probably be having issues. Try printing out the ID of each of the pizzaboy variables after creating them like:

    pawn Код:

    for(new i=0; i<8; i++)printf(%d, pizzaboy[i]);

    And then try print the vehicleid on OnPlayerStateChange.

    Try putting random prints each line and see if it puts anything into the console:

    pawn Код:

    CMD:makeadmin(playerid, params[]){    new targetid, level, string[100];    print(A);    if(!IsPlayerAdmin(playerid)||PlayerInfo[playerid][pAdmin] < 7) return SendClientMessage(playerid,0xFF0000FF,{FF0000}[SERVER]You're not authorized to use that command.);    print(B);    if(sscanf(params, ud, targetid, level)) return SendClientMessage(playerid, COLOR_RED, {FF0000}[SERVER]Usage: /makeadmin [playerid] [adminlevel]);    print(C);    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, {FF0000}[SERVER]{BABABA} Player is not connected!);    print(D);    PlayerInfo[targetid][pAdmin] = level;    print(E);    format(string, sizeof(string), {FF0000}[SERVER]{FFFFFF}%s {BABABA}set your {FFFFFF}Admin {BABABA}Level to{FF0000} %d, GetName(playerid), level);    print(F);    SendClientMessage(targetid, COLOR_GREEN, string);    print(G);    format(string, sizeof(string), {FF0000}[SERVER]{BABABA}You set {FFFFFF}%s's {FFFFFF}Admin {BABABA}Level to{FF0000} %d, GetName(targetid), level);    print(H);    SendClientMessage(playerid, COLOR_GREEN, string);    return 1;}

    See what letter it gets up to if any.

    Did you edit

    pawn Код:

    $user['Name'] = 'ftp://'.$FTP_USER.':'.$FTP_PASS.'@YOURSERVERIPHERE/samp03/users/'.$_SESSION['Username'].'.ini';

    With your server IP? Also, make sure that that's actually the directory in which your user files are stored. E.g. Make sure that /samp03/users is where the user data is stored based on where the FTP directory starts.


    Originally Posted by Metharon

    Please don't post links to stupid includes ! i don't need those anti-cheats i need only those 2

    The best way to learn how to do this is to look in these so called 'stupid includes' where they do their armour and health checks and then learn from that .

    What your code is doing is it will check through the first player in the loop and if they're not in range then it will say that there is no player in range. If you think about the logic of this:

    -> Foreach executes
    -> Pick first person in the Foreach loop (lets say ID 0)
    -> Code determines ID 0 isn't in range

    pawn Код:

    return SCM(playerid, red, [ERROR]COL_WHITE No player is in range.);

    is called
    -> Loop stops there.

    So what you want to do is this:

    pawn Код:

    CMD:nuke(playerid,params[]){    new string[150];    if(InDMArena[playerid] == 1) return SCM(playerid, red, [ERROR]COL_WHITE You cannot use this command while in the DM stadium.);    if(gTeam[playerid] != TEAM_TFH) return SCM(playerid, red, [ERROR]COL_WHITE Only horsemen can nuke players.);    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER or GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)    {        SendClientMessage(playerid,COLOR_ERROR,[ERROR]COL_WHITE You cannot burn someone while in a vehicle. Exit the vehicle first.);        return 1;    }    if(HasNukedRecently[playerid] >= 1)    {        format(string, sizeof(string),[ERROR]COL_WHITE Please wait COL_RED%d secondsCOL_WHITE before burning someone again.,HasNukedRecently[playerid]);        SCM(playerid,red,string);        return 1;    }    if(pInfo[playerid][XP] < 2000)    {        return SCM(playerid,red,[ERROR]COL_WHITE Insufficient XP (2000));    }    foreach(Player, i)    {        if(GetDistanceBetweenPlayers(playerid,i) <= 4 and i != playerid)        {            new Float:ARMOUR, Float:HEALTH;            GetPlayerArmour(playerid, ARMOUR);            GetPlayerHealth(playerid, HEALTH);            HasNukedRecently[playerid] =500;            new xp = pInfo[playerid][XP];            pInfo[playerid][XP] =xp-2000;            new Float:x, Float:y, Float:z;            if(aDuty[i] == 0 and gTeam[i] != TEAM_TFH)            {                GetPlayerPos(i, x, y, z);                CreateExplosion(x, y , z + 2, 1, 10);                SetPlayerHealth(i, 0);                format(Jstring,sizeof(Jstring),[NUKE]COL_WHITE Horseman %s[%d] has used his/her nuke abillity.,GetName(playerid),playerid);                SendClientMessageToAll(COLOR_TFH,Jstring);                format(Jstring, sizeof(Jstring),[NUKED]COL_WHITE %s[%d] has been killed by horseman %s[%d]'s nuke abillity., GetName(i), i, GetName(playerid), playerid);                SCMToAll(red, Jstring);                SetPlayerArmour(playerid, ARMOUR);                SetPlayerHealth(playerid, HEALTH);            }            return 1;        }    }    return SCM(playerid, red, [ERROR]COL_WHITE No player is in range.);}

    It seems that it's just appending the old password onto the new string. Make sure all strings are cleared before trying to update again. I'm not sure why this is happening (if it's still an issue I'll take an in depth look later).

    Also, you need to save the salt in the database somewhere. You cant just salt the hash and then assume that the server will know the salt for next time.

    Good luck.

    1. Make sure you check that damagedid isn't INVALID_PLAYER_ID before you start checking variables with it.
    2. Make sure that TEAM_AT is a created variable.

    I would say that the easiest way is to just timestamp it with gettime then either
    A: Have a timer every once in a while that checks everyones timestamps against their current ones.
    B: Use OnPlayerConnect (but they wouldn't lose their VIP until they relogged).