Jump to content
  • 0

Skin Selector


Stefan F.

Question

5 answers to this question

Recommended Posts

  • 0

pai poti face o comanda simpla, gen

  if(strcmp(cmd, "/skin", true) == 0
  {
    //trebuie sa pui toate skinurile, sau poti face un text document cu skin-uri si sa folisesti 
    asta :format(string2, sizeof(string2), "users/%s.ini", playername2);
	new File: UserFile = fopen(string2, io_read);
	si pui GivePlayerMoney(playerid //-suma);

 

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

pai poti face o comanda simpla, gen

  if(strcmp(cmd, "/skin", true) == 0
  {
    //trebuie sa pui toate skinurile, sau poti face un text document cu skin-uri si sa folisesti 
    asta :format(string2, sizeof(string2), "users/%s.ini", playername2);
	new File: UserFile = fopen(string2, io_read);
	si pui GivePlayerMoney(playerid //-suma);

 

De ce sa se chinuie asa mult pentru asta cand ar putea face pur si simplu asta:

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

		if (!strlen(skin))
		{
			SendClientMessage(playerid, Rosu, "Foloseste: /skin [skinid]");
			return 1;
		}
		new newskin = strval(skin);
		if ((newskin < 0) || (newskin > 311) || IsInvalidSkin(newskin)) {
			SendClientMessage(playerid, Galben, "Skinul nu exista.");
			return 1;
		}

		if (GetPlayerMoney(playerid) >= Suma ta.)
		{
			SetPlayerSkin(playerid, newskin);
			GivePlayerMoney(playerid,-0);
			format(string, 128, "Ti-ai schimbat skinul in %d", newskin);
			SendClientMessage(playerid, Albastru, string);
		}
		else
		{
			SendClientMessage(playerid, Rosu, "Nu pot schimba skinul.");
		}
		return 1;
	}

E mult mai simplu asa...

  • Upvote 1

Ofer servicii de web designer/developer(contact me pentru portofoliu etc)

Metode de plata: Paysafecard,Skrill,PayPal,Bitcoin

Ofer si servicii de Penetration Testing.

Vand si VPN-uri. 5 euro pe luna

Skype: live:mrtunne.tkcode

Discord: https://mrtunne.info/discord

Link to comment
Share on other sites

  • 0

Incearca in felul urmator:

CMD:incearca(playerid, params[])
{
    ForceClassSelection(playerid)
    GivePlayerMoney(playerid, -500); // setezi tu suma de bani 
    return 1;
}

 

Multumesc.Dar mai trebuia adaugat TogglePlayerSpectating

CMD:skin(playerid, params[])
{
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);
    GivePlayerMoney(playerid, -500);
	return 1;
}

Solved.T/C

Edited by ..::STeFaNN::..
  • Upvote 1
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
Answer this question...

×   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.