Well it isn't letting me edit my message, and I want to show progress on the server so far..
This is what I have for Blackjack.
Kind of upset that it wont take my array numbers.. :[
So I only have shuffling really working.
We also have a server.
I am the only NAT, and beginner at that. :C
PHP Code:
findplayer("Devil_Lord2").addweapon(this.name);
//#CLIENTSIDE
function onCreated(){
thiso.cardAmount = {
{0,0},{42,0},"4H","5H","6H","7H","8H","9H","10H",
"Jack H","Queen H","King H","Ace H",
"2S","3S","4S","5S","6S","7S","8S","9S","10S",
"Jack S","Queen S","King S","Ace S",
"2D","3D","4D","5D","6D","7D","8D","9D","10D",
"Jack D","Queen D","King D","Ace D",
"2C","3C","4C","5C","6C","7C","8C","9C","10C",
"Jack C","Queen C","King C","Ace C"
};
player.chat = this.cardAmount[1][0] SPC this.cardAmount[1][1];
this.cardDeck = {
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0
};
this.playerCheck = 0;
this.playerAmount = {
{-1,0,0,0,0,0},
{-1,0,0,0,0,0},
{-1,0,0,0,0,0},
{-1,0,0,0,0,0}
};
new GuiShowImgCtrl("DavidKBJ_CardP1-1") {
position = "7,25";
image = "dkcards.png";
partw = 41;
parth = 52;
partx = this.cardAmount[1][0];
party = this.cardAmount[1][1];
}
}
function DavidKBJ_Computers1.onAction(){
DavidKBlackJack_System.extent = {270, 300};
this.playerCheck = 1;
cardShuffle();
DavidKBJ_Computers1.hide();
DavidKBJ_Computers2.hide();
DavidKBJ_Computers3.hide();
}
function DavidKBJ_Computers1.onAction(){
DavidKBlackJack_System.extent = {270, 300};
this.playerCheck = 2;
cardShuffle();
DavidKBJ_Computers1.hide();
DavidKBJ_Computers2.hide();
DavidKBJ_Computers3.hide();
}
function DavidKBJ_Computers1.onAction(){
DavidKBlackJack_System.extent = {270, 300};
this.playerCheck = 3;
cardShuffle();
DavidKBJ_Computers1.hide();
DavidKBJ_Computers2.hide();
DavidKBJ_Computers3.hide();
}
function onWeaponFired(){
new GuiWindowCtrl("DavidKBlackJack_System") {
position = {screenwidth/2-135,screenheight/2-150};
extent = "270, 75";
text = " BlackJack";
canClose = false;
new GuiButtonCtrl("DavidKBJ_Computers1") {
position = "10, 27";
extent = "80, 40";
text = "1 Computer";
}
new GuiButtonCtrl("DavidKBJ_Computers2") {
position = "95, 27";
extent = "80, 40";
text = "2 Computer";
}
new GuiButtonCtrl("DavidKBJ_Computers3") {
position = "180, 27";
extent = "80, 40";
text = "3 Computer";
}
new GuiShowImgCtrl("DavidKBJ_CardP1-1") {
position = "7,25";
image = "dkcards.png";
partw = 41;
parth = 52;
partx = this.cardAmount[1][0];
party = this.cardAmount[1][1];
}
}
}
function cardShuffle(){
this.cardShuffle = {
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0
};
for (i=0;i<54;i++){
player.chat = this.cardShuffle[this.card]@" and "@ this.card;
this.card = int(random(1,54));
if (this.cardShuffle[this.card] != 0){
while (this.cardShuffle[this.card] != 0){
this.card = int(random(1,54));
}
}
this.cardShuffle[this.card] = 1;
this.cardDeck[i] = this.cardAmount[this.card];
}
}
function cardCheck(){
}