Potrebna mi je /kill komanda ali samo admin da moze /kill ID. Znam uraditi komandu da svak sebe moze sam /kill. Evo dio skripte pa ako netko zna da mi uradi.
CMD:setskin(playerid, params[])
{
new id, skin, string[128];
if(PlayerInfo[playerid][pAdmin] < 4)return NisiAdmin(playerid);
else if(sscanf(params, "ui", id, skin))return Koristi(playerid, "/setskin [playerid] [skin]");
else if(id == INVALID_PLAYER_ID) return PogresanID(playerid);
else if(skin < 0 && skin > 73 || skin < 75 && skin > 299)return kDM(playerid, "Skin nije valjan!");
SetPlayerSkin(id, skin);
PlayerInfo[playerid][Skin] = skin;
format(string, sizeof(string), "Stavio si igracu %s, skin ID: %d", PlayerName(id), skin);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "Admin %s, ti je dao skin ID: %d", PlayerName(playerid), skin);
SendClientMessage(id, -1, string);
return 1;
}
Evo to je za skin sto ima komanda ako moze neko da mi uradi /kill ali samo admin da moze, evo admin komande sto imaju na serveru.
CMD:ah(playerid, params[])
{
SendClientMessage(playerid, -1, ""#COL_LGREEN"____________________________________________________CroHerze DeathMatch Admin__________");
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, -1, "Adm Lvl 1: /goto | /a | /mark | /gotomark | /cc | /kick | /mute | /unmute | /o | /adm | /citer?");
SendClientMessage(playerid, -1, "Adm Lvl 1: /slap | /resetiraj | /check | /port | /flip | /nadji | /aon | /aoff | /poruzja");
}
if(PlayerInfo[playerid][pAdmin] >= 2)
{
SendClientMessage(playerid, -1, "Adm Lvl 2: /up | /recon | /uncon | /war1 | /war2 | /warpokreni | /warzaustavi");
SendClientMessage(playerid, -1, "Adm Lvl 2: /setint | /freeze | /unfreeze | /ban | /warn | /resetirajsva");
}
if(PlayerInfo[playerid][pAdmin] >= 3)
{
SendClientMessage(playerid, -1, "Adm Lvl 3: /disarm | /setarmor | /sethp | /gethere | /bitchslap | /fixveh | /setweather");
}
if(PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage(playerid, -1, "Adm Lvl 4: /muteall | /unmuteall | /freezeall | /unfreezeall | /gethereall | /setskin | /offban");
}
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
SendClientMessage(playerid, -1, "Adm Lvl 1337: /makeleader | /cb | /setstat | /givestat | /unban | /payday | /givegun");
}
if(PlayerInfo[playerid][pAdmin] >= 1338)
{
SendClientMessage(playerid, -1, "Adm Lvl 1338: /1 | /dajchbodove");
}
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, -1, "RCON Adm: /scp | /givemoney | /makeadmin");
Znaci ovdje da bude npr da admin lvl 1 moze /kill ID
Nadam se da ste me shvatili pozzz
CMD:ubij(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >=2)
{
new string[150];
new id;
new playa;
new health;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD1, "Koristite: /ubij [ID/Dio Imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GRAD1, "Krivi ID!");
SetPlayerHealth(playa, health);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "|Ubijen| Admin %s je ubio %s.", sendername,giveplayer);
SendAdminMessage(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "|A| Ubijen si od admina %s",sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
}
return 1;
}
Brate izbaci mi 4 errora
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(3264) : error 029: invalid expression, assumed zero
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(3266) : warning 217: loose indentation
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(3271) : error 017: undefined symbol "SCM"
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(3272) : error 017: undefined symbol "SCM"
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(3273) : warning 217: loose indentation
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(3277) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Dodaj gore #define SCM SendClientMessage;
CMD:ubij(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >=2)
{
new string[150];
new id;
new playa;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD1, "Koristite: /ubij [ID/Dio Imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GRAD1, "Krivi ID!");
SetPlayerHealth(playa, 0);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, " Admin %s te je ubio, %s.", sendername,giveplayer);
SCM(-1,string);
}
return 1;
}
Evo bratesve sam uradio kako si rekao samo sam obrisao gamesage jer to nema kod mene i promjenio sam boje jer su kod mene drugacije definisane ali mi izbaci sljedece
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4191) : error 029: invalid expression, assumed zero
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4198) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4198) : warning 215: expression has no effect
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4199) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4199) : warning 215: expression has no effect
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4200) : warning 217: loose indentation
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4201) : warning 217: loose indentation
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4202) : warning 217: loose indentation
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4203) : warning 217: loose indentation
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4204) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\3don1'\Desktop\kdm (1)\kdm\gamemodes\CHDM.pwn(4204) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
CMD:ubij(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >=2)
{
new string[150];
new id;
new playa;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD1, "Koristite: /ubij [ID/Dio Imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GRAD1, "Krivi ID!");
SetPlayerHealth(id, 0);
GetPlayerName(id, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, " Admin %s te je ubio, %s.", sendername,giveplayer);
SCM(-1,string);
}
return 1;
}
opet brate isti warning i eror nezz do cega je :r
Citat: •´¯`•. âˆ,αηιεâ,," zεÑσ .•´¯`• poslato Septembar 30, 2012, 14:12:33 POSLE PODNE
CMD:ubij(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >=2)
{
new string[150];
new id;
new playa;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD1, "Koristite: /ubij [ID/Dio Imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GRAD1, "Krivi ID!");
SetPlayerHealth(id, 0);
GetPlayerName(id, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, " Admin %s te je ubio, %s.", sendername,giveplayer);
SCM(-1,string);
}
return 1;
}
ÄŒekaj, moderator si. Zar on ne bih trebao pravila Äitati ?
Citat: вιg вÏ...ηηу poslato Septembar 30, 2012, 14:18:06 POSLE PODNE
Citat: •´¯`•. âˆ,αηιεâ,," zεÑσ .•´¯`• poslato Septembar 30, 2012, 14:12:33 POSLE PODNE
CMD:ubij(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameSage] >=2)
{
new string[150];
new id;
new playa;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SCM(playerid, COLOR_GRAD1, "Koristite: /ubij [ID/Dio Imena]");
if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GRAD1, "Krivi ID!");
SetPlayerHealth(id, 0);
GetPlayerName(id, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, " Admin %s te je ubio, %s.", sendername,giveplayer);
SCM(-1,string);
}
return 1;
}
ÄŒekaj, moderator si. Zar on ne bih trebao pravila Äitati ?
Moja greska, izvinjavam se , nisam ni primetio ..klhikuhj\