Adminduty

Započeo Å minker, April 22, 2010, 21:10:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Å minker

Moze mi neko objasnit kako napravit komandu adminduty
znaci da kada admin kuca /adminduty da mu je ime plavo a kad kuca adminoffduty da mu je ime normalno??
pokusaval sam vec 100 puta i nemogu :D

nastoe

if(!strcmp(cmdtext, "/adminduty", true))
{
if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "Moras biti ulogiran");
return 1;
    }
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
        if(AdminDuty[playerid] == 0)
        {
            AdminDuty[playerid] = 1;
            SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[ID:%d]%s je sada na zadatku", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
        }
        else if(AdminDuty[playerid] == 1)
        {
            AdminDuty[playerid] = 0;
            SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[ID:%d]%s vise nije na zadatku", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "Moras biti administrator");
        return 1;
    }
}
    return 1;
}

Å minker

e super ali baca mi errorove :S

C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9963) : warning 217: loose indentation
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 017: undefined symbol "AdminDuty"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : warning 215: expression has no effect
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


mozes sredit?

Citat: Ù©(-̮̮̃•̃)Û¶ Å minker  Ù©(-̮̮̃•̃)Û¶ poslato April 22, 2010, 21:40:54 POSLE PODNE
e super ali baca mi errorove :S

C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9963) : warning 217: loose indentation
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 017: undefined symbol "AdminDuty"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : warning 215: expression has no effect
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


mozes sredit?

Moras definirati AdminDuty, a na liniji 9963 moras nesto odmaci, jer nisi dobro postavio. Barem tako mislim, ispravite me ako grijesim.
Povratak na balkan-samp  :)  15.01.2013. 
..   


Respect : [BP]HeLoX, Correlli, [CH:FR]Djea, LordShigi, LuKsA, BloodMaster, [H]265

Å minker

mozes mi reci kako da to definiram?

new adminduty;??
kaj da tocno napisem?
:D

new AdminDuty[MAX_PLAYERS];

a evo ti komanda za adminduty, za slucaj da je extreme negdje pogrijesio pa ti izlijece error


if(!strcmp(cmdtext, "/komanda", true)) // Mjenjaj na svoju komandu  ;D
{
if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Uloguj se prvo !");
return 1;
    }
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
        if(AdminDuty[playerid] == 0)
        {
            AdminDuty[playerid] = 1;
            SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_VAGOS_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarning: [ID:%d]% ide na duznost kao admin", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
    for(new i = 0; i < sizeof(CarInfo); i++)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
}
return 1;
        }
        else if(AdminDuty[playerid] == 1)
        {
            AdminDuty[playerid] = 0;
            SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmWarning: [ID:%d]% ide sa duznosti kao admin", playerid, sendername);
ABroadCast(COLOR_YELLOW,string,1);
return 1;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Niste admin !");
        return 1;
    }
}
    return 1;
}
Povratak na balkan-samp  :)  15.01.2013. 
..   


Respect : [BP]HeLoX, Correlli, [CH:FR]Djea, LordShigi, LuKsA, BloodMaster, [H]265

Å minker

aa jebemu sad mi baca ove erroreve :D


C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 017: undefined symbol "CarInfo"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 036: empty statement
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 017: undefined symbol "i"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Citat: Ù©(-̮̮̃•̃)Û¶ Å minker  Ù©(-̮̮̃•̃)Û¶ poslato April 22, 2010, 22:47:38 POSLE PODNE
aa jebemu sad mi baca ove erroreve :D


C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 017: undefined symbol "CarInfo"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 036: empty statement
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : error 017: undefined symbol "i"
C:\DOCUME~1\PaNtEk!\Desktop\TESTSE~1\GAMEMO~1\gf.pwn(9974) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


kopiraj mi tu liniju  (  9974  )
Povratak na balkan-samp  :)  15.01.2013. 
..   


Respect : [BP]HeLoX, Correlli, [CH:FR]Djea, LordShigi, LuKsA, BloodMaster, [H]265

Å minker

evo 9974

for(new i = 0; i < sizeof(CarInfo); i++)

virtuozo

to obrisi to je za ownership a gf nema ownership tak da taj dio obrisi