Jump to content

Recommended Posts

Posted (edited)

SALUT, ASTAZI AM SA VA ARAT UN MIC AVANTAJ IN LIMBAJUL DE SCRIPTING PAWN.

PENTRU INCEPUT, DU-TE LA INCLUDE-URI. SI ADAUGAM ASTA >

#include <y_va.inc>

ACUM, MERGEM SA CREEM UN NOU STOCK >

stock SCMf( playerid, color, const string[ ], va_args<> ) {
	new string2[ 256 ]; va_format( string2, sizeof string2, string, va_start<3> );
	return SendClientMessage( playerid, color, string2 ); }

Acum am sa va arat cum se foloseste > 

// FORMAT MESSAGE.
CMD:test(playerid, params[]) {
	new string[128];
	format(string, sizeof string, "Numele meu este %s, si am dick-ul mare", GetName(playerid));
	SCM(playerid, COLOR_RED, string);
	return 1; }

// SMCf MESSAGE.

CMD:test(playerid, params[]) {
	SCMf(playerid, COLOR_RED, "Numele meu este %s si am dick-ul mare", GetName(playerid));
	return 1; }

Downlaod Y_VA.INC > http://www.filehost.ro/3172800870/y_va_inc/

 

Credite: EraSy. 

Edited by DrooM.
  • Haha 1
Posted
Acum 30 minute, DrooM. a spus:

SALUT, ASTAZI AM SA VA ARAT UN MIC AVANTAJ IN LIMBAJUL DE SCRIPTING PAWN.

PENTRU INCEPUT, DU-TE LA INCLUDE-URI. SI ADAUGAM ASTA >


#include <y_va.inc>

ACUM, MERGEM SA CREEM UN NOU STOCK >


stock SCMf( playerid, color, const string[ ], va_args<> ) {
	new string2[ 256 ]; va_format( string2, sizeof string2, string, va_start<3> );
	return SendClientMessage( playerid, color, string2 ); }

Acum am sa va arat cum se foloseste > 


// FORMAT MESSAGE.
CMD:test(playerid, params[]) {
	new string[128];
	format(string, sizeof string, "Numele meu este %s, si am dick-ul mare", GetName(playerid));
	SCM(playerid, COLOR_RED, string);
	return 1; }

// SMCf MESSAGE.

CMD:test(playerid, params[]) {
	SCMf(playerid, COLOR_RED, "Numele meu este %s si am dick-ul mare", GetName(playerid));
	return 1; }

Downlaod Y_VA.INC > http://www.filehost.ro/3172800870/y_va_inc/

Dragut dar de ce sa folosesc 256 de caractere cand am nevoie de maxim 30 ? :D

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Posted
45 minutes ago, StR_Marian said:

Dragut dar de ce sa folosesc 256 de caractere cand am nevoie de maxim 30 ? :D

Il folosesti doar unde depaseste 256... Eu doar am dat un exemplu.

Posted (edited)
1 hour ago, StR_Marian said:

Dragut dar de ce sa folosesc 256 de caractere cand am nevoie de maxim 30 ? :D

va_format( string2, strlen(string), string, va_start<3> );

Ar trebui să funcționeze (cred, n-am testat).

Postarea cred că ar trebui mutată la resurse scripting.

Edited by Kingsley 2.0
Posted

Daca am ajuns copiat, inseamna ca e bine ce fac:

 image.png.a8f11ae76295ae076d482c0a64c43b37.png

Face si omu' o functie in gamemode-ul de la Eternal Times, ajunge pe net, sub exact acelasi format.

Frumos.

  • Like 1
Posted
22 hours ago, EraSy said:

Daca am ajuns copiat, inseamna ca e bine ce fac:

 image.png.a8f11ae76295ae076d482c0a64c43b37.png

Face si omu' o functie in gamemode-ul de la Eternal Times, ajunge pe net, sub exact acelasi format.

Frumos.

Fmm, de unde sa stiu ca e al tau, stai, acu bag credite..

Posted (edited)
La 20.03.2018 la 21:36, StR_Marian a spus:

Dragut dar de ce sa folosesc 256 de caractere cand am nevoie de maxim 30 ? :D

Str_marian... exact cum e el.. in stare naturala..

Si daca ai nevoie de maxim 30, nu poti baga un parametru in plus functiei?(pui numele size) .. stai ca te-am pierdut de la parametru.. scz

Lasand ironiile si memoriile cu rezolvariile tale super smechere...  Cui ii pasa de cativa biti ram? Cel mai important e procesorul.. regula numaru 1 e sa ai iteratori... scurtezi considerabil timpul de execute.. adica inalturi iteratiile nefolositoare... Ai invatat azi ceva? cu placere.

 

Edited by Scriptery
  • Confused 1
  • 2 weeks later...
Posted
La 21.03.2018 la 19:44, EraSy a spus:

Daca am ajuns copiat, inseamna ca e bine ce fac:

 image.png.a8f11ae76295ae076d482c0a64c43b37.png

Face si omu' o functie in gamemode-ul de la Eternal Times, ajunge pe net, sub exact acelasi format.

Frumos.

Copilaș, si tu mai esti scripter ma ?

http://forum.sa-mp.com/showthread.php?t=526494

Ai modificat si tu str cu string2 si e facuta de tine.

Posted

Ceva mai simplu

#define     SCMM(%0,%1,%2,%3)         format(gString, sizeof(gString),%2,%3) && SCM(%0, %1, gString)

CMD:blablabla(playerid,parmams[]){
    SCMM(playerid, -1 ,"Bulagiu: %s", GetName(playerid));
    return 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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.