Luxgen
Новичок
Приветствую хочу узнать из за чего не могу присоединиться к столу для игры?
Система казино покер. Ввожу команду для того что бы присоединиться к игре (к столу) и нечего не происходит
Сделал тест тексты что бы проверить какая проверка не работает.
Вот сам код:
Сама система которая присоединяет к столу игроков:
Система останавливается до TEXT 3 на проверку if(PokerTable[tableid][pkrSlot] == -1)
Файл казино прикреплю
Система казино покер. Ввожу команду для того что бы присоединиться к игре (к столу) и нечего не происходит
Сделал тест тексты что бы проверить какая проверка не работает.
Вот сам код:
PHP:
CMD:jointable(playerid, params[])
{
if(GetPVarType(playerid, "pkrTableID") == 0) {
for(new t = 0; t < MAX_POKERTABLES; t++) {
if(IsPlayerInRangeOfPoint(playerid, 5.0, PokerTable[t][pkrX], PokerTable[t][pkrY], PokerTable[t][pkrZ])) {
if(PokerTable[t][pkrPass][0] != EOS) {
if(!strcmp(params, PokerTable[t][pkrPass], false, 32)) {
JoinPokerTable(playerid, t);
} else {
return SendClientMessage(playerid, COLOR_WHITE, "Usage: /jointable (password)");
}
} else {
JoinPokerTable(playerid, t);
}
return 1;
}
}
} else {
SendClientMessage(playerid, COLOR_WHITE, "You are already at a Poker Table! You must /leavetable before you join another one!");
}
return 1;
}
PHP:
stock JoinPokerTable(playerid, tableid)
{
// Check if there is room for the player
SendClientMessage(playerid, COLOR_WHITE, "TEXT 1");
if(PokerTable[tableid][pkrPlayers] < PokerTable[tableid][pkrLimit])
{
// Check if table is not joinable.
if(PokerTable[tableid][pkrActive] == 1) {
SendClientMessage(playerid, COLOR_WHITE, "Someone is setting up this table, try again later.");
return 1;
}
// Find an open seat
SendClientMessage(playerid, COLOR_WHITE, "TEXT 2");
for(new s; s < 6; s++) {
if(PokerTable[tableid][pkrSlot][s] == -1) {
SetPVarInt(playerid, "pkrTableID", tableid+1);
SetPVarInt(playerid, "pkrSlot", s);
// Occuply Slot
PokerTable[tableid][pkrPlayers] += 1;
PokerTable[tableid][pkrSlot][s] = playerid;
SendClientMessage(playerid, COLOR_WHITE, "TEXT 3");
// Check & Start Game Loop if Not Active
if(PokerTable[tableid][pkrPlayers] == 1) {
// Player is Room Creator
SetPVarInt(playerid, "pkrRoomLeader", 1);
ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME);
PokerTable[tableid][pkrActive] = 1; // Warmup Phase
PokerTable[tableid][pkrPulseTimer] = SetTimerEx("PokerPulse", 1000, true, "i", tableid);
SendClientMessage(playerid, COLOR_WHITE, "TEXT 4");
//PokerPulse(tableid);
} else { // Execute code for Non-Room Creators
ShowCasinoGamesMenu(playerid, DIALOG_CGAMESBUYINPOKER);
SelectTextDraw(playerid, COLOR_GOLD);
}
CameraRadiusSetPos(playerid, PokerTable[tableid][pkrX], PokerTable[tableid][pkrY], PokerTable[tableid][pkrZ], 90.0, 4.7, 0.1);
new Float:tmpPos[3];
GetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
SetPVarFloat(playerid, "pkrTableJoinX", tmpPos[0]);
SetPVarFloat(playerid, "pkrTableJoinY", tmpPos[1]);
SetPVarFloat(playerid, "pkrTableJoinZ", tmpPos[2]);
ApplyAnimation(playerid, "CASINO", "cards_out", 4.1, 0, 1, 1, 1, 1, 1);
TogglePlayerControllable(playerid, 0);
SetPlayerPosObjectOffset(PokerTable[tableid][pkrObjectID], playerid, PokerTableMiscObjOffsets[s][0], PokerTableMiscObjOffsets[s][1], PokerTableMiscObjOffsets[s][2]);
SetPlayerFacingAngle(playerid, PokerTableMiscObjOffsets[s][5]+90.0);
ApplyAnimation(playerid, "CASINO", "cards_out", 4.1, 0, 1, 1, 1, 1, 1);
SendClientMessage(playerid, COLOR_WHITE, "TEXT 5");
// Create GUI
CreatePokerGUI(playerid);
ShowPokerGUI(playerid, GUI_POKER_TABLE);
// Hide Action Bar
PokerOptions(playerid, 0);
return 1;
}
}
}
return 1;
}
Файл казино прикреплю
Вложения
-
120.2 KB Просмотры: 4
Последнее редактирование модератором:
