[Ajuda] COR NICK
#1

Galera meu servidor esta com uma cor padrao so para todos players que entra, como eu faзo pra tipo fica automatico, quando eles entrar vir cores diferentes, para diferenciar dos outros players?
Reply
#2

Procura por SetPlayerColor, no seu GM, pode esta na callback OnPlayerConnect ou OnPlayerSpawn, delete, pronto agora os players terao cores aleatorias.
Reply
#3

Fiz este sistema que te permite escolher as cores que os players terгo e ela й setada de forma randфmica.
PHP код:
new CORES [ ] = {
0x00FF80AA,
0x80FF00AA,
0xFFFFFFAA,
0x0080FFAA,
0x0080FFAA,
0x00FFFFAA,
0x0080C0AA,
0x8F20FFAA
};

public 
OnPlayerConnect(playerid)
{
    new 
random1 randomsizeofCORES ) ) ;
    
SetPlayerColor(playeridCOLORS random2 ]) ;
    return 
1;

Reply
#4

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
Fiz este sistema que te permite escolher as cores que os players terгo e ela й setada de forma randфmica.
PHP код:
new CORES [ ] = {
0x00FF80AA,
0x80FF00AA,
0xFFFFFFAA,
0x0080FFAA,
0x0080FFAA,
0x00FFFFAA,
0x0080C0AA,
0x8F20FFAA
};
public 
OnPlayerConnect(playerid)
{
    new 
random1 randomsizeofCORES ) ) ;
    
SetPlayerColor(playeridCOLORS random2 ]) ;
    return 
1;

como removo esses erros:

C:\Documents and Settings\MaxiMuS\Desktop\New Server\gamemodes\new.pwn(1012) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MaxiMuS\Desktop\New Server\gamemodes\new.pwn(1012) : error 017: undefined symbol "random2"
C:\Documents and Settings\MaxiMuS\Desktop\New Server\gamemodes\new.pwn(1012) : error 029: invalid expression, assumed zero
C:\Documents and Settings\MaxiMuS\Desktop\New Server\gamemodes\new.pwn(1012) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Linha 1012 : SetPlayerColor(playerid, COLORS [ random2 ]) ;
Reply
#5

PHP код:
new CORES [ ] = {
0x00FF80AA,
0x80FF00AA,
0xFFFFFFAA,
0x0080FFAA,
0x0080FFAA,
0x00FFFFAA,
0x0080C0AA,
0x8F20FFAA
};
public 
OnPlayerConnect(playerid)
{
    new 
random1 randomsizeofCORES ) ) ;
    
SetPlayerColor(playeridCORES random1 ]) ;
    return 
1;

Reply
#6

Quote:
Originally Posted by iTakelot
Посмотреть сообщение
PHP код:
new CORES [ ] = {
0x00FF80AA,
0x80FF00AA,
0xFFFFFFAA,
0x0080FFAA,
0x0080FFAA,
0x00FFFFAA,
0x0080C0AA,
0x8F20FFAA
};
public 
OnPlayerConnect(playerid)
{
    new 
random1 randomsizeofCORES ) ) ;
    
SetPlayerColor(playeridCORES random1 ]) ;
    return 
1;

VALEU MANO
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)