SA-MP Forums Archive
I need help - 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)
+--- Thread: I need help (/showthread.php?tid=663712)



I need help - Hammad123 - 09.02.2019

I need some help with Scripting, can you please PM me? I will give you my discord ID and we can talk/discuss there.
I'd be very thankful to whoever helps me I won't take more than a hour of your precious time.


Re: I need help - TokicMajstor - 09.02.2019

Rules of forum are saying following: Do not ask for private help

Sooo...


Re: I need help - Hammad123 - 09.02.2019

Oh, can I have your discord ID please? aaaax#0296 there add me.


Re: I need help - Hammad123 - 10.02.2019

Oh ok. I will ask here as soon as I am on my PC


Re: I need help - Hammad123 - 10.02.2019

Код:
E:\New folder\pawno\include\cnr/cnr_admincommands.inc(1006) : error 037: invalid string (possibly non-terminated string)
E:\New folder\pawno\include\cnr/cnr_admincommands.inc(1006) : warning 215: expression has no effect
E:\New folder\pawno\include\cnr/cnr_admincommands.inc(1006) : error 001: expected token: ";", but found ")"
E:\New folder\pawno\include\cnr/cnr_admincommands.inc(1006) : error 029: invalid expression, assumed zero
E:\New folder\pawno\include\cnr/cnr_admincommands.inc(1006) : fatal error 107: too many error messages on one line

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


4 Errors.
pawn Код:
COMMAND:teleport(playerid, params[])
{
    if(playerData[playerid][playerLoggedIn])
    {
        if(playerData[playerid][playerLevel] >= 6)
        {
          ShowPlayerDialog(playerid, DIALOG_ATELEPORT, DIALOG_STYLE_LIST, "Admin Teleport", "Bank \nSFPD \nSFPD Parking Lot \nArmy Spawn \nCIA/FBI Spawn \nAmmunation \nAirport \nHospital \nSupa Save \nChurch \nSuburban \nGym \nLS Airport \nVan Courier \nVIP Lounge \nCar Drop \nBomb Shop \nJob Centre \nTrucking \nAdmin Lounge \nVehicle Dealership \nForklift Mission \nMinigames", "Go", "Cancel");
        }
        else
        {
            return 0;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You must be logged in to use commands.");
    }
(1006)
    return 1;
}
Also is this /admins script okay? It is supposed to show admins online with some names assigned to their levels.
pawn Код:
CMD:admins(playerid, params[])
{
    new count = 1, name[24], string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pAdminLevel] != 0)
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string), "%s%s%s \n", string, GetPlayerAdminRank(i), name);
            count ++;
        }
    }

    if(count > 0)
    {
        ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "Online Admins", string, "OK", "");
    }
    else ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "OK", "");
}

stock GetPlayerAdminRank(playerid)
{
    new rankname[32];

    switch(PlayerInfo[playerid][pAdminLevel])
    {
        case 1: { rankname = " Trial moderator"; }
        case 2: { rankname = "Adminstrator"; }
        case 3: { rankname = "Senior adminstrator"; }
        case 4: { rankname = "Asst  Head admin"; }
        case 5: { rankname = "head admin"; }
        case 6: { rankname = "Co-Owner"; }
        case 7: { rankname = "Owner"; }
        default: { rankname = "Moderator"; }
    }

    return rankname;
}