hi all
#1

i have new new colors[400]={ 400 colors}
how i can onplayerconnect set his color random one of my list?
Reply
#2

pawn Код:
public OnPlayerConnect(playerid){
  SetPlayerColor(playerid,random(sizeof(colors)));
  return true;
}
Reply
#3

Quote:
Originally Posted by yezizhu
pawn Код:
public OnPlayerConnect(playerid){
  SetPlayerColor(playerid,random(sizeof(colors)));
  return true;
}
i replaced colors with ColorsAlpha
and i get
Код:
C:\Documents and Settings\^^\My Documents\NikeRaptor\gamemodes\raz.pwn(2345) : warning 203: symbol is never used: "ColorsAlpha"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#4

i renamed the colors alpha but same effect help?
Reply
#5

It's just a warning that "ColorsAlpha" isn't used. If you want to use "ColorsAlpha" instead of "colors", change
Код:
SetPlayerColor(playerid,random(sizeof(colors)));
to:
Код:
SetPlayerColor(playerid,random(sizeof(ColorsAlpha)));
Reply
#6

but that i made but i get same warning
Reply
#7

EDIT: Add
pawn Код:
#pragma unused ColorsAlpha
under the
pawn Код:
#include a_samp

Typo.
Reply
#8

Yea, and then the code will not work! woo-ee that is what we've been aiming for..

pawn Код:
SetPlayerColor(playerid, colors[random(sizeof(colors))]);
You can replace the colors with colorsalpha if that is the name of your
pawn Код:
new colors[400] { }
Reply
#9

nvm , solved by myself!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)