Jump to content
  • 0

Problema culoare


Mister

Question

Problema intalnita (descriere): Am facut un sistem de setare a culorii playerului(SetPlayerColor) si am facut niste variabile care sa stocheze culoarea, apoi sa iti seteze culoarea cand te spawnezi


Ero(area / rile) / warning-(ul / urile): nu am erori, eroarea este ca numele imi apare negru nu culoarea respectiva
Liniile de cod / sursa / script-ul(obligatoriu):

new Color[16];// pentru ca am 16 factiuni

apoi la un stock

stock PlayerColor(factionid)
{
format(Color[1],40,"0xFFFFFFC8");
format(Color[2],40,"0x0080C0C8");//si tot asa
return Color[factionid];//returnez culoarea de care am nevoie
}
apoi la onplayerspawn

SetPlayerColor(playerid,PlayerColor(PlayerInfo[playerid][pMember]));


Imagini / Video (optional): nu este nevoie
Ati incercat sa rezolvati singur?: am incercat destule, ma gandeam ca vedeti ceva ce eu nu vad

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
On ‎7‎/‎18‎/‎2016 at 15:21, Mister said:

Problema intalnita (descriere): Am facut un sistem de setare a culorii playerului(SetPlayerColor) si am facut niste variabile care sa stocheze culoarea, apoi sa iti seteze culoarea cand te spawnezi


Ero(area / rile) / warning-(ul / urile): nu am erori, eroarea este ca numele imi apare negru nu culoarea respectiva
Liniile de cod / sursa / script-ul(obligatoriu):


new Color[16];// pentru ca am 16 factiuni

apoi la un stock

stock PlayerColor(factionid)
{
format(Color[1],40,"0xFFFFFFC8");
format(Color[2],40,"0x0080C0C8");//si tot asa
return Color[factionid];//returnez culoarea de care am nevoie
}
apoi la onplayerspawn

SetPlayerColor(playerid,PlayerColor(PlayerInfo[playerid][pMember]));


Imagini / Video (optional): nu este nevoie
Ati incercat sa rezolvati singur?: am incercat destule, ma gandeam ca vedeti ceva ce eu nu vad

new Color[16];// pentru ca am 16 factiuni

apoi la un stock

stock PlayerColor(factionid)
{
format(Color[1],40,"0xFFFFFFC8");
format(Color[2],40,"0x0080C0C8");//si tot asa
return Color[factionid];//returnez culoarea de care am nevoie
}
apoi la onplayerspawn

SetPlayerColor(playerid,PlayerInfo[playerid][PlayerColor[pMember]]);

incearca asa..poate merge

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

Servicii Scripting de calitate:

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

Future Project: ExpertGame

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

Link to comment
Share on other sites

  • 0
stock SetPlayerFactionColor( playerid )
{
	switch( playerVariables[ playerid ][ pFaction ] )
	{
	    // Civilian
	    case 0: SetPlayerColor( playerid, COLOR_WHITE );
	    // LVPD
	    case 1: SetPlayerColor( playerid, 0x0064FF00 );
	    // Taxi LV
	    case 2: SetPlayerColor( playerid, COLOR_YELLOW );
	    // Paramedic
	    case 3: SetPlayerColor( playerid, 0xFF634700 );
	    // School Instructors
	    case 4: SetPlayerColor( playerid, COLOR_SI );
	    //
	    case 5: SetPlayerColor( playerid, 0x6A5ACD00 );
	    //
	    case 6: SetPlayerColor( playerid, 0x7FFFD400 );
	    //
	    case 7: SetPlayerColor( playerid, COLOR_RED );
	    //
	    case 8: SetPlayerColor( playerid, 0xA52A2A00 );
	    // LSPD
	    case 9: SetPlayerColor( playerid, 0x0064FF00 );
	    // Taxi LS
	    case 10: SetPlayerColor( playerid, COLOR_YELLOW );
	    // Grove
	    case 11: SetPlayerColor( playerid, COLOR_Grove );
	    // Los Vagos
	    case 12: SetPlayerColor( playerid, COLOR_Vagos );
	    // Hitman
	    case 13: SetPlayerColor( playerid, COLOR_HITMAN );
	    // News Reporters
	    case 14: SetPlayerColor( playerid, COLOR_NEWS );
	    // Russian Mafia
	    case 15: SetPlayerColor( playerid, COLOR_RussianMafia );
	}
}

@Mister asta stia si el, cred ca era util sa-l ajuti nu sa-i confirmi esecul. Arata-i "serviciile de calitate".

Edited by SoNNy.sys

Sinner.png

Link to comment
Share on other sites

  • 0

@SoNNy.sys nu fi rautocios, si nu cred ca ai inteles stiu si eu ca functioneaza asa cum imi dai tu eu vreau sa functioneze daca inloc de asta

case 0: SetPlayerColor( playerid, COLOR_WHITE );

 

pun asta

case 0: SetPlayerColor( playerid, Color[0] );

Si nu functioneaza cu variabila,

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
  • 0
3 hours ago, WiDuAlK said:

asa merge, am testat.

Tot negru imi apare numele, nu inteleg care e faza, am pus culorile direct si apare albastru, adica nu am pus idul gresit

new Color[16];

onplayerspawn


    SetPlayerColor(playerid,PlayerColor(PlayerInfo[playerid][pMember]));

stockul

stock PlayerColor(factionid)
{
    switch(factionid)
    {
        case 1:        format(Color[factionid],40,"0xFFFFFFC8");
        case 2:        format(Color[factionid],40,"0x0080C0C8");
    }
    return Color[factionid];
}

 

Sunt membru in factiunea 1 imi dau spawn sunt negru, sunt in factiunea 2 imi dai spawn sunt tot negru

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.