Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Question

Posted

Salut.Cum pot face o comanda prin care sa se ruleze OnPlayerRequestClass.Stiu ca se poate si cu F4 dar vreau sa ia si o suma de bani celui care foloseste comanda.

5 answers to this question

Recommended Posts

  • 0
Posted

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

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

  • 0
Posted

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

  • 0
Posted

Va multumesc ca v-ati dat interesul dar eu ma refeream la ceva de genul:

1.thumb.JPG.e8dcd4e6ac5fb5dfa38a772c9a4f

Dar mie mi-a iesit ceva de genul...2.thumb.JPG.f437b2c720fafb2c9d15a71a3c86

 

  • 0
Posted

Incearca in felul urmator:

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

 

  • 0
Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.