Peršokti į turinį
Andrius1993

SA-MP Skripto pamoka SUPERADMIN Komandos

Recommended Posts

Sveiki taigi pastebejau, kad daugelis zmoniu nezinote kaip scripte gauti superadmin komandas nes daugeliuose GM ju tiesiog nera(komandu situ)

Taigi pradekime:

Pirma atidarome kur randasi jusu serverio failai> atidarome PAWNO programa> tada spaudziame file>Open ir pasirinkite jusu GM ji dazniausiai randasi Gamemodes ir band7.pwn ir visaip kitaip vadinas :)

Komanda /duotixp

if(!strcmp(cmdtext, "/duotixp", true,6))

{

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, COLOR, "* Duoti xp: /duotixp [dalis nicko] [kiek]"); return 1;}

new tid = GetPlayeridMid(tname);

GetPlayerName(tid,tname,sizeof(tname));

new string[256];

string = GetArgument(2, cmdtext, 0);

if(!IsNumeric(string)){SendClientMessage(playerid, COLOR, "* Duoti xp: /duoti [dalis nicko] [kiek (turi but skaicius)]"); return 1;}

new xps = StringToInt(string);

if(xps == 0){SendClientMessage(playerid, COLOR, "* Duoti xp: /duoti [dalis nicko] [kiek]"); return 1;}

new Float:Coo[3];

GetPlayerPos(tid,Coo[0],Coo[1],Coo[2]);

if(!PlayerToPoint(30, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, COLOR, "* Jis ( Ji ) per toli!"); return 1;}

new prideti = GetPlayerScore(playerid+500);

SetPlayerScore(tid,prideti);

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

format(mess,sizeof(mess),"***[%s >> %i XP Gavote %i XP is %s",name,xps,xps,name);

SendClientMessage(tid,COLOR,mess);

format(mess,sizeof(mess),"***[%i XP >> %s] Pridejote %i XP %s",xps,tname,xps,tname);

SendClientMessage(playerid,COLOR,mess);

return 1;

}

komanda /nuimtixp

}

if(!strcmp(cmdtext, "/nuimtixp", true,8))

{

if(playerDB[playerid][admin] != true){SendClientMessage(playerid, RED, "* Tokios komandos nera!"); return 1;}

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, COLOR, "* Nuimti zaidejuai XP: /nuimtixp [dalis_nicko] [kiek]"); return 1;}

new tid = GetPlayeridMid(tname);

GetPlayerName(tid,tname,sizeof(tname));

new tstring[256];

tstring = GetArgument(2, cmdtext, 0);

if(!IsNumeric(tstring)){SendClientMessage(playerid, COLOR, "* Nuimti zaidejuai XP: /nuimtixp [dalis_nicko] [kiek (turi but skaicius)]"); return 1;}

new xpas = StringToInt(tstring);

if(xpas == 0){SendClientMessage(playerid, COLOR, "* Nuimti zaidejuai XP: /[email protected]@p [dalis_nicko] [kiek]"); return 1;}

new Float:Coo[3];

GetPlayerPos(tid,Coo[0],Coo[1],Coo[2]);

if(!PlayerToPoint(30, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, COLOR, "* Jis ( Ji ) per toli!"); return 1;}

new prideti = GetPlayerScore(tid);

new prideti2 = SetPlayerScore(tid,xpas);

SetPlayerScore(tid,(tid,prideti-prideti2-xpas-1));

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

format(mess,sizeof(mess),"***[%s >> %i XP] Nuime %i XP is %s",name,xpas,xpas,name);

SendClientMessage(tid,RED,mess);

format(mess,sizeof(mess),"***[%i XP >> %s] Nuimete %i XP %s",xpas,tname,xpas,tname);

SendClientMessage(playerid,RED,mess);

return 1;

}

tada komanda eina /skirti admin

}

if(!strcmp(cmdtext, "/skirtiadmin", true,10))

{

if(playerDB[playerid][admin] != true){SendClientMessage(playerid, RED, "* Tokios komandos nera!"); return 1;}

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, BLUE, "* Skirti adminu: /skirtiadmin [dalis nicko]"); return 1;}

new tid = GetPlayeridMid(tname);

if(tid==INVALID_PLAYER_ID)

{

SendClientMessage(playerid,RED,"* Tokio zaidejo nera.");

return 1;

}

GetPlayerName(tid,tname,sizeof(tname));

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

playerDB[tid][admin] = true;

format(mess,sizeof(mess),"* Sveikiname, jus paskirtas atlikti Admin`o pareigas.");

SavePlayerData(tid, false);

SendClientMessage(tid,RED,mess);

format(mess,sizeof(mess),"* Paskyrete %s Adminu.",tname);

SendClientMessage(playerid,RED,mess);

return 1;

}

Komanda /nuimtiadmin

}

if(!strcmp(cmdtext, "/nuimtiadmin", true,12))

{

if(playerDB[playerid][admin] != true){SendClientMessage(playerid, RED, "* Tokios komandos nera!"); return 1;}

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, BLUE, "* Nuimt admina: /nuimtiadmin [dalis nicko]"); return 1;}

new tid = GetPlayeridMid(tname);

if(tid==INVALID_PLAYER_ID)

{

SendClientMessage(playerid,RED,"* Tokio zaidejo nera.");

return 1;

}

GetPlayerName(tid,tname,sizeof(tname));

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

playerDB[tid][admin] = false;

SavePlayerData(tid, false);

format(mess,sizeof(mess),"* Jus netinkate buti adminu.");

SendClientMessage(tid,GREEN,mess);

if(playerDB[tid][vedelogin]){SavePlayerData(tid,false);}

format(mess,sizeof(mess),"* nuimete %s admina.",tname);

SendClientMessage(playerid,BLUE,mess);

return 1;

}

Taigi /nuimtivip

}

if(!strcmp(cmdtext, "/nuimtivip", true,12))

{

if(playerDB[playerid][admin] != true){SendClientMessage(playerid, RED, "* Tokios komandos nera!"); return 1;}

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, BLUE, "* Nuimt admina: /nuimtiadmin [dalis nicko]"); return 1;}

new tid = GetPlayeridMid(tname);

if(tid==INVALID_PLAYER_ID)

{

SendClientMessage(playerid,RED,"* Tokio zaidejo nera.");

return 1;

}

GetPlayerName(tid,tname,sizeof(tname));

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

playerDB[tid][vip] = false;

SavePlayerData(tid, false);

format(mess,sizeof(mess),"* Jus netinkate buti adminu.");

SendClientMessage(tid,GREEN,mess);

if(playerDB[tid][vedelogin]){SavePlayerData(tid,false);}

format(mess,sizeof(mess),"* nuimete %s admina.",tname);

SendClientMessage(playerid,BLUE,mess);

return 1;

Tu tik norejai pratestuot ar kazka padaryt ir kas nors prisijunge i servery kai to nereikia? iskickink visus su komanda:

}

if(!strcmp(cmdtext, "/kickall", true,5))

if(playerDB[playerid][admin])

{

for ( new pid; pid < MAX_PLAYERS; pid ++ )

{

if ( IsPlayerConnected ( pid ) )

Kick ( pid );

}

return 1;

}

Tavo Gm panesa Merus?Meras atsakingas uz tvarka ir pns

komanda /skirtimeru

if(!strcmp(cmdtext, "/skirtimeru", true,10))

{

if(playerDB[playerid][admin] != true){SendClientMessage(playerid, RED, "* Tokios komandos nera!"); return 1;}

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, BLUE, "* Skirti meru: /skirtimeru [dalis nicko]"); return 1;}

new tid = GetPlayeridMid(tname);

if(tid==INVALID_PLAYER_ID)

{

SendClientMessage(playerid,RED,"* Tokio zaidejo nera.");

return 1;

}

GetPlayerName(tid,tname,sizeof(tname));

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

playerDB[tid][prezidentas] = true;

format(mess,sizeof(mess),"* Sveikiname, jus paskirtas atlikti Mer'o pareigas.");

SavePlayerData(tid, false);

SendClientMessage(tid,RED,mess);

format(mess,sizeof(mess),"* Paskyrete %s Metu.",tname);

SendClientMessage(playerid,RED,mess);

return 1;

}

Komanda /unban

if(!strcmp(cmdtext, "/unban", true,6))

{

if(cmdtext[6]==0)

{

SendClientMessage(playerid, ORANGE, "* Atblokuoti zaideja: /unban [Vardenis_Pavardenis]");

SendClientMessage(playerid, ORANGE, "* ** Butina irasyti pilna varda!");

return 1;

}

new msg[256],vardas[MAX_PLAYER_NAME];

GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);

new tid = GetPlayeridMid(vardas);

GetPlayerName(tid, vardas, sizeof(vardas));

GetPlayerName(playerid, vardas, sizeof(vardas));

format(msg,sizeof(msg),"%s unban %s",vardas,tid);

SendClientMessage(playerid, COLOR_WHITE, msg);

format(msg,sizeof(msg),"%s unban %s",vardas,tid);

SendClientMessage(playerid, COLOR_WHITE, msg);

SendClientMessage(playerid, COLOR_WHITE, "Atblokuotas");

SendRconCommand("reloadbans");

GetPlayerName(tid, vardas, sizeof(vardas));

GetPlayerName(playerid, vardas, sizeof(vardas));

return 1;

}

Tada kuriame scripta

Kaip skriti zaideja Vip'u? stai irasome si koda:

komanda bus /skirtivip

if(!strcmp(cmdtext, "/skirtivipu", true,10))

{

if(playerDB[playerid][superadmin]!= true){SendClientMessage(playerid, RED, "* Tokios komandos nera!"); return 1;}

new tname[MAX_PLAYER_NAME];

strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);

if(!strcmp(tname,"0",true)){SendClientMessage(playerid, BLUE, "* Skirti vipu: /skirtivupu [dalis nicko]"); return 1;}

new tid = GetPlayeridMid(tname);

if(tid==INVALID_PLAYER_ID)

{

SendClientMessage(playerid,RED,"* Tokio zaidejo nera.");

return 1; }

GetPlayerName(tid,tname,sizeof(tname));

new mess[256],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

playerDB[tid][vip] = true;

format(mess,sizeof(mess),"* Sveikiname, jus paskirtas atlikti VIP'o pareigas.");

SavePlayerData(tid, false);

SendClientMessage(tid,RED,mess);

format(mess,sizeof(mess),"* Paskyrete %s vipu.",tname);

SendClientMessage(playerid,RED,mess);

return 1;

}

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį


Svečias
Ši tema yra užrakinta.

  • Narių peržiūri šį forumą:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.


  • SuperGames programele
  • SuperGames programele


×