Jump to content

Tutoriale/Comenzi/Functii/Informatii


cmg4life

Recommended Posts

  • Replies 183
  • Created
  • Last Reply

Top Posters In This Topic

Guest graffyk

/setskin cine are?

Uite:


    if(strcmp(cmd, "/setskin", true) == 0)
	{
	    new Skin;
	    new tmp[256];
		tmp = strtok(cmdtext, idx);
		Skin = strval(tmp);

		if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /setskin [0 - 299]");

		if(Skin >= 300) return SendClientMessage(playerid, COLOR_GREY, "Skins: 0 - 299");

		SetPlayerSkin(playerid, Skin);

		return 1;
	}


    if(strcmp(cmd, "/carcolor", true) == 0)
	{
    new color1, color2;
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "Type /carcolor for car color change!");
    color1 = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "Type /carcolor for car color change!");
    color2 = strval(tmp);
    ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
    return 1;
	}

Car color
Link to comment
Share on other sites

Guest FreeSoul

tutorialul e de nota 10.Dar cum pot sa fac ca moveobject sa mearga decat daca player x este in team x?

Am pus niste gates in anumite locuri si nu vreau sa fie accesibile de toti...

Link to comment
Share on other sites

pun pariu ca folosesti un mod GodFather

pt asta iti trebuie

if(gTeam[playerid] == x || PlayerInfo[playerid][pLeader] == x || PlayerInfo[playerid][pMember] == x)
{

in loc de "x" pui numarul factiunii care sa aiba acces la poarta

Imi aduc aminte cand jucam pe versiunea 0.1.. ala era SA-MP adevarat.

Va salut cu respect (pe cei care merita).

Link to comment
Share on other sites

if(strcmp(cmd, "/open", true) == 0)
  		{
      		if(gTeam[playerid] == x || PlayerInfo[playerid][pLeader] == x || PlayerInfo[playerid][pMember] == x)
      		{
     		MoveObject(numeleportii, x.x, y.y, z.z, viteza);
      		}
}

Imi aduc aminte cand jucam pe versiunea 0.1.. ala era SA-MP adevarat.

Va salut cu respect (pe cei care merita).

Link to comment
Share on other sites

okay deci stiu cum sa fac sa se miste doar un obiect dar cum sa se miste doua obiecte la doar o comanda?

Pui coordonatele la celalalt obiect sub primul.

if(strcmp(cmd, "/open", true) == 0)
  {
      if(gTeam[playerid] == x || PlayerInfo[playerid][pLeader] == x || PlayerInfo[playerid][pMember] == x)
      {
      MoveObject(numeleportii, x.x, y.y, z.z, viteza);
      MoveObject(numeleportii2, x.x, y.y, z.z, viteza);      }
}

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

:=-" post="8897" timestamp="1236452863"]

Pui coordonatele la celalalt obiect sub primul.

if(strcmp(cmd, "/open", true) == 0)
  		{
      		if(gTeam[playerid] == x || PlayerInfo[playerid][pLeader] == x || PlayerInfo[playerid][pMember] == x)
      		{
     		MoveObject(numeleportii, x.x, y.y, z.z, viteza);
      MoveObject(numeleportii2, x.x, y.y, z.z, viteza);      		}
}
nu mere asa ai pus gresit paranteza aia "}" pune asa
if(strcmp(cmd, "/open", true) == 0)
  		{
      		if(gTeam[playerid] == x || PlayerInfo[playerid][pLeader] == x || PlayerInfo[playerid][pMember] == x)
      		{
     		MoveObject(numeleportii, x.x, y.y, z.z, viteza);
                MoveObject(numeleportii2, x.x, y.y, z.z, viteza);      		
                }
}


nu ar merita topicu sa fie Sticky?

Imi aduc aminte cand jucam pe versiunea 0.1.. ala era SA-MP adevarat.

Va salut cu respect (pe cei care merita).

Link to comment
Share on other sites

/healall da viata la toti dupa server

	if(strcmp(cmd, "/healall", true) == 0)
{
    GetPlayerName(playerid, sendername, sizeof(sendername));
    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
    if(logged[playerid] == 1)
    {
        if(PlayerInfo[playerid][pAdmin] >= 2)
        {
        format(string, sizeof(string), "AdmCMD: %s a dat viata la toti", sendername);
    SendClientMessageToAll(COLOR_BLUE, string);
            for(new i = 0; i < MAX_PLAYERS; i ++)
{
    if(IsPlayerConnected(i))
    {
    SetPlayerHealth(i, 100);
}
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nu ai autorizatie sa folosesti comanda!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Trebuie sa fii logat ca sa folosesti comanda!");
}
return 1;
}
/armourall da armura la toti
	if(strcmp(cmd, "/armourall", true) == 0)
{
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(logged[playerid] == 1)
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
{
format(string, sizeof(string), "AdmCMD: Adminul %s a dat armura la toti.", sendername);
    SendClientMessageToAll(COLOR_BLUE, string);
  new PlayerName[30];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    printf("[Comanda] %s a scris /armourall pt a da armura la toti.", PlayerName);
    for(new i = 0; i < MAX_PLAYERS; i++)
{
    SetPlayerArmour(i, 100);
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Nu ai autorizatie sa folosesti comanda!");
}
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Trebuie sa fii logat ca sa folosesti comanda!");
}
return 1;
}

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

AFK stiti ce inseamna

	if (strcmp("/afk", cmdtext, true) == 0)
{
if(isafk[playerid] == 0)
{
isafk[playerid] = 1;
TogglePlayerControllable(playerid,false);
SetCameraBehindPlayer(playerid);
new string[256];
new name[128];
GetPlayerName(playerid,name,128);
format(string, sizeof(string), "%s este acum AFK.",name);
new setname[16];
format(setname, sizeof(setname), "%s[AFK]",name);
if(!strlen(name[11]))
{
afktag[playerid] = 1;
SetPlayerName(playerid,setname);
}
SendClientMessageToAll(yellow, string);
SendClientMessage(playerid, yellow, "Scrie /back pentru a reveni!");
}
else
{
return SendClientMessage(playerid,red,"Esti acum AFK!");
}
return 1;
}
/back ca sa revii din AFK
	if (strcmp("/back", cmdtext, true) == 0)
{
if(isafk[playerid] == 1)
{
isafk[playerid] = 0;
TogglePlayerControllable(playerid,true);
SetCameraBehindPlayer(playerid);
new string[128];
new name[16];
GetPlayerName(playerid,name,16);
new pname[16];
GetPlayerName(playerid,pname,16);
strdel(pname, strlen(pname)-5, strlen(pname));
if(afktag[playerid] == 1)
{
afktag[playerid] = 0;
SetPlayerName(playerid,pname);
}
new name2[16];
GetPlayerName(playerid,name2,16);
format(string, sizeof(string), "%s s-a intors.",name2);
SendClientMessageToAll(yellow, string);
SendClientMessage(playerid, yellow, "Scrie /afk pentru a fi AFK!");
}
else
{
return SendClientMessage(playerid,red,"Nu esti AFK!");
}
return 1;
}
return 0;
}

Imi era lene sa dau Edit  :D

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

                                                            Lista comenzi RCON

Am facut o lista cu comenzile de la rcon pentru cei care nu le stiu.

    [*] /rcon cmdlist - Arata comenzile de rcon

    [*] /rcon varlist - Arata lista curenta.

    [*] /rcon exit - Inchide server-ul

    [*] /rcon echo [text] - Mesaj pe ecran "admin:x"

    [*] /rcon hostname [nume] - Schimbi numele server-ului

    [*] /rcon gamemodetext [nume] - Schimbi numele GM-ului

    [*] /rcon mapname [name] - Schimbi numele mapei

    [*] /rcon exec [filename] - Executa un fisier din scriptfiles (exemplu: /rcon exec blah.cfg).

    [*] /rcon kick [iD] - Dai kick (exemplu: /rcon kick 2).

    [*] /rcon ban [iD] - Dai ban(exemplu: /rcon ban 2).

    [*] /rcon changemode [mode] - Schimbi GM-ul (exemplu: /rcon changemode sftdm).

    [*] /rcon gmx - Dai restart la server (gamemode0) in server.cfg.

    [*] /rcon reloadbans - Mai citeste o data lista de ban.

    [*] /rcon reloadlog - Stergi fisierul server.log

    [*] /rcon say - Scrii prin admin  (exemplu: /rcon say blah).

    [*] /rcon players - Arata playerii din server (Nume, IP si Ping).

    [*] /rcon banip [iP] - Dai Ban pe IP (exemplu: /rcon banip 127.0.0.1).

    [*] /rcon unbanip [iP] - Scoti BAN-ul pe IP (exemplu: /rcon unbanip 127.0.0.1).

    [*] /rcon gravity - Schimbi gravitatia (exemplu: /rcon gravity 0.008).

    [*] /rcon weather [iD] - Schimbi vremea (exemplu: /rcon weather 1).

    [*] /rcon loadfs - Incarca un Filterscript (exemplu: /rcon loadfs adminfs).

    [*] /rcon unloadfs - Opreste functionarea unui filterscript (exemplu: /rcon unloadfs adminfs).

    [*] /rcon reloadfs - Reincarca filterscriptul (exemplu: /rcon reloadfs adminfs).

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.