PDA

Просмотр полной версии : [Вопрос] Не выполняется действие



Ramos :3
11.11.2014, 23:15
Когда вводишь команду вызывающую на кнопку Y флудит в чат. скриншот (http://SSmaker.ru/93dbf98b/)


if(newkeys & KEY_NO)
{
if(GetPVarInt(playerid,"pSettleHouseOffee") == playerid)
{
new offer = GetPVarInt(playerid,"pSettleHouseOffer");
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SCM(playerid,COLOR_BLUE,"Вы отказались от жилья");
SCM(offer,COLOR_BLUE,"Клиент отказался от заселения в Ваш дом");
}
if(GetPVarInt(playerid, "KostiName") < 999)
{
SetPVarInt(playerid, "KostiName",999);
SetPVarInt(playerid, "KostiMoney", 0);
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(GetPVarInt(playerid, "KostiName"),-1,"- Игрок отказался от предложения");
}
if(GetPVarInt(playerid,"Invite") == 1)
{
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(GetPVarInt(playerid,"Player"),-1,"- Игрок отказался от предложения");
DeletePVar(playerid,"Invite");
DeletePVar(playerid,"Player");
}
if(pTemp[playerid][pShowSkillact] == playerid)
{
SCM(playerid,-1,"Вы отказались от предложения");
SCM(pTemp[playerid][pShowSkillpl],-1,"Игрок отказался от предложения");
pTemp[playerid][pShowSkillact] = -1;
}
if(PlayerInfo[playerid][pShowPassact] == playerid)
{
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(PlayerInfo[playerid][pShowPasspl],-1,"- Игрок отказался от предложения");
PlayerInfo[playerid][pShowPassact] = -1;
}
}
if(newkeys & KEY_YES)
{
if(GetPVarInt(playerid,"pSettleHouseOffee") == playerid)
{
new houseid = GetPVarInt(playerid, "pSettleHouseID");
new offerid = GetPVarInt(playerid, "pSettleHouseOffer");
if(GetPVarInt(offerid, "pSettleHouseOffer") == INVALID_PLAYER_ID || !IsPlayerConnected(offerid))
{
SCM(playerid,CGRAY,"Тот, кто предлагал поселиться у него дома вышел из игры");
SetPVarInt(offerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseID",0);
return true;
}
SCMF(playerid,0x269BD8FF,"Вы стали жильцом в доме {"#cWHITE"}%s",NamePlayer[offerid]);
SCMF(offerid,0x269BD8FF,"Вы приняли {"#cWHITE"}%s {"#cINFO"}жильцом в свой дом",NamePlayer[playerid]);
PlayerInfo[playerid][pTempKey] = houseid;
SetPVarInt(offerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseID",0);
}
if(GetPVarInt(playerid, "KostiName") < 999)
{
if(!PlayerToPoint(30.0,playerid,1130.7448,-1.4491,1000.6797)) return SCM(playerid, COLOR_WHITE, "Вы должны находиться в казино!");
new dice = random(12)+1;
new dice1 = random(12)+1;
new stringer[190];
format(stringer, sizeof(stringer), "%s и %s бросили кости. Результат: {CC9900}%i:%i",NamePlayer[GetPVarInt(playerid, "KostiName")],NamePlayer[playerid],dice,dice1);
ProxDetector(5.0, playerid, stringer, 0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF);
if(dice > dice1)
{
PlayerInfo[GetPVarInt(playerid, "KostiName")][pCash] += GetPVarInt(playerid, "KostiMoney");
PlayerInfo[playerid][pCash] -= GetPVarInt(playerid, "KostiMoney");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_GREEN, "Поздравляем, Вы выиграли!");
SCM(playerid, COLOR_ORANGE, "К сожалению, Вы проиграли!");
format(stringer, sizeof(stringer), "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), stringer, 3000, 1);
format(stringer, sizeof(stringer), "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, stringer, 3000, 1);
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,COLOR_ORANGE,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,TEAM_GROVE_COLOR,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
if(dice < dice1)
{
PlayerInfo[GetPVarInt(playerid, "KostiName")][pCash] -= GetPVarInt(playerid, "KostiMoney");
PlayerInfo[playerid][pCash] += GetPVarInt(playerid, "KostiMoney");
SCM(playerid, COLOR_GREEN, "Поздравляем, Вы выиграли!");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_ORANGE, "К сожалению, Вы проиграли!");
format(stringer, sizeof(stringer), "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, stringer, 3000, 1);
format(stringer, sizeof(stringer), "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), stringer, 3000, 1);
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,TEAM_GROVE_COLOR,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,COLOR_ORANGE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
if(dice == dice1)
{
SCM(playerid, COLOR_ORANGE, "Игра закончилась в ничью!");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_ORANGE, "Игра закончилась в ничью!");
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,COLOR_LIGHTBLUE,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,COLOR_LIGHTBLUE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
}
if(GetPVarInt(playerid,"Invite") == 1)
{
new acter = GetPVarInt(playerid,"Player");
GetFrak(acter,PlayerInfo[acter][tMember],1147);
SetPVarInt(acter,"invite",playerid);
DeletePVar(playerid,"Invite");
DeletePVar(playerid,"Player");
}
if(PlayerInfo[playerid][pShowPassact] == playerid)
{
new acter = PlayerInfo[playerid][pShowPasspl],stringer[90];
ShowPass(acter,playerid);
format(stringer,sizeof(stringer),"достал паспорт и показал его %s",NamePlayer[playerid]);
MeAction(acter,stringer);
PlayerInfo[playerid][pShowPassact] = -1;
}
if(pTemp[playerid][pShowSkillact] == playerid)
{
new acter = pTemp[playerid][pShowSkillpl];
scat[0] = 0; // Очищаем
new points[6];
points[0] = 100 - PlayerInfo[acter][pSDPistol];
points[1] = 100 - PlayerInfo[acter][pDesertEagle];
points[2] = 100 - PlayerInfo[acter][pShotGun];
points[3] = 100 - PlayerInfo[acter][pMP5];
points[4] = 100 - PlayerInfo[acter][pAK47];
points[5] = 100 - PlayerInfo[acter][pM4];
format(scat,sizeof(scat),"{FFFFFF}SDPistol:\t[%s]%d\nDeagle:\t[%s]%d \nShotGun:\t[%s]%d\nMP5\t\t[%s]%d \nAK47:\t\t[%s]%d\nM4A1:\t\t[%s]%d",
ToDevelopSkills(PlayerInfo[acter][pSDPistol],points[0]),PlayerInfo[acter][pSDPistol],
ToDevelopSkills(PlayerInfo[acter][pDesertEagle],points[1]),PlayerInfo[acter][pDesertEagle],
ToDevelopSkills(PlayerInfo[acter][pShotGun],points[2]),PlayerInfo[acter][pShotGun],
ToDevelopSkills(PlayerInfo[acter][pMP5],points[3]),PlayerInfo[acter][pMP5],
ToDevelopSkills(PlayerInfo[acter][pAK47],points[4]),PlayerInfo[acter][pAK47],
ToDevelopSkills(PlayerInfo[acter][pM4],points[5]),PlayerInfo[acter][pM4]);
ShowPlayerDialog(playerid,231,DIALOG_STYLE_MSGBOX,"{FFFF00}Навыки владения оружием",scat,"Закрыть","");
new mese[64];
format(mese,sizeof(mese),"показал выписку из тира %s'y",NamePlayer[playerid]);
MeAction(acter,mese);
pTemp[playerid][pShowSkillact] = -1;
}
}




CMD:pass(playerid, params[])
{
if(sscanf(params,"d",params[0])) return SCM(playerid, COLOR_WHITE, "/pass [ID игрока]");
if(!IsPlayerConnected(params[0])) return SCM(playerid,COLOR_WHITE,"Неверный ID игрока");
if (!ProxDetectorS(8.0, playerid, params[0])) return SCM(playerid, COLOR_RED, "Человек слишком далеко!");
SCMF(playerid, 0x269BD8FF, "Вы предложили {FFFFFF}%s {"#cINFO"} показать паспорт",NamePlayer[params[0]]);
SCMF(params[0], COLOR_WHITE, "%s {"#cINFO"}хочет показать Вам паспорт. Чтобы подтвердить нажмите {33AA33}Y{"#cINFO"}, иначе {"#cRED"}N",NamePlayer[playerid]);
PlayerInfo[params[0]][pShowPasspl] = playerid;
PlayerInfo[params[0]][pShowPassact] = params[0];
return true;
}
c:skill;
{
if(sscanf(params,"d",params[0])) return SCM(playerid, COLOR_WHITE, "Введите: /skill [id]");
if(!IsPlayerConnected(params[0])) return SCM(playerid,CGRAY,"Неверный ID игрока");
if (!ProxDetectorS(8.0, playerid, params[0])) return SCM(playerid, COLOR_WHITE, "Человек не рядом с вами!");
SCMF(playerid, 0x269BD8FF, "Вы предложили {FFFFFF}%s {"#cINFO"} показать выписку из тира",NamePlayer[params[0]]);
SCMF(params[0], COLOR_WHITE, "%s {"#cINFO"}хочет показать Вам выписку из тира. Чтобы подтвердить нажмите {33AA33}Y{"#cINFO"}, иначе {"#cRED"}N",NamePlayer[playerid]);
pTemp[params[0]][pShowSkillpl] = playerid;
pTemp[params[0]][pShowSkillact] = params[0];
return true;
}

DeimoS
12.11.2014, 00:54
if(newkeys & KEY_NO)
{
if(GetPVarInt(playerid,"pSettleHouseOffee") == playerid)
{
new offer = GetPVarInt(playerid,"pSettleHouseOffer");
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SCM(playerid,COLOR_BLUE,"Вы отказались от жилья");
SCM(offer,COLOR_BLUE,"Клиент отказался от заселения в Ваш дом");
}
else if(GetPVarInt(playerid, "KostiName") < 999)
{
SetPVarInt(playerid, "KostiName",999);
SetPVarInt(playerid, "KostiMoney", 0);
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(GetPVarInt(playerid, "KostiName"),-1,"- Игрок отказался от предложения");
}
else if(GetPVarInt(playerid,"Invite") == 1)
{
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(GetPVarInt(playerid,"Player"),-1,"- Игрок отказался от предложения");
DeletePVar(playerid,"Invite");
DeletePVar(playerid,"Player");
}
else if(pTemp[playerid][pShowSkillact] == playerid)
{
SCM(playerid,-1,"Вы отказались от предложения");
SCM(pTemp[playerid][pShowSkillpl],-1,"Игрок отказался от предложения");
pTemp[playerid][pShowSkillact] = -1;
}
else if(PlayerInfo[playerid][pShowPassact] == playerid)
{
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(PlayerInfo[playerid][pShowPasspl],-1,"- Игрок отказался от предложения");
PlayerInfo[playerid][pShowPassact] = -1;
}
}
if(newkeys & KEY_YES)
{
if(GetPVarInt(playerid,"pSettleHouseOffee") == playerid)
{
new houseid = GetPVarInt(playerid, "pSettleHouseID");
new offerid = GetPVarInt(playerid, "pSettleHouseOffer");
if(GetPVarInt(offerid, "pSettleHouseOffer") == INVALID_PLAYER_ID || !IsPlayerConnected(offerid))
{
SCM(playerid,CGRAY,"Тот, кто предлагал поселиться у него дома вышел из игры");
SetPVarInt(offerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseID",0);
return true;
}
SCMF(playerid,0x269BD8FF,"Вы стали жильцом в доме {"#cWHITE"}%s",NamePlayer[offerid]);
SCMF(offerid,0x269BD8FF,"Вы приняли {"#cWHITE"}%s {"#cINFO"}жильцом в свой дом",NamePlayer[playerid]);
PlayerInfo[playerid][pTempKey] = houseid;
SetPVarInt(offerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseID",0);
}
else if(GetPVarInt(playerid, "KostiName") < 999)
{
if(!PlayerToPoint(30.0,playerid,1130.7448,-1.4491,1000.6797)) return SCM(playerid, COLOR_WHITE, "Вы должны находиться в казино!");
new dice = random(12)+1;
new dice1 = random(12)+1;
new stringer[190];
format(stringer, sizeof(stringer), "%s и %s бросили кости. Результат: {CC9900}%i:%i",NamePlayer[GetPVarInt(playerid, "KostiName")],NamePlayer[playerid],dice,dice1);
ProxDetector(5.0, playerid, stringer, 0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF);
if(dice > dice1)
{
PlayerInfo[GetPVarInt(playerid, "KostiName")][pCash] += GetPVarInt(playerid, "KostiMoney");
PlayerInfo[playerid][pCash] -= GetPVarInt(playerid, "KostiMoney");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_GREEN, "Поздравляем, Вы выиграли!");
SCM(playerid, COLOR_ORANGE, "К сожалению, Вы проиграли!");
format(stringer, sizeof(stringer), "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), stringer, 3000, 1);
format(stringer, sizeof(stringer), "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, stringer, 3000, 1);
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,COLOR_ORANGE,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,TEAM_GROVE_COLOR,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
else if(dice < dice1)
{
PlayerInfo[GetPVarInt(playerid, "KostiName")][pCash] -= GetPVarInt(playerid, "KostiMoney");
PlayerInfo[playerid][pCash] += GetPVarInt(playerid, "KostiMoney");
SCM(playerid, COLOR_GREEN, "Поздравляем, Вы выиграли!");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_ORANGE, "К сожалению, Вы проиграли!");
format(stringer, sizeof(stringer), "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, stringer, 3000, 1);
format(stringer, sizeof(stringer), "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), stringer, 3000, 1);
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,TEAM_GROVE_COLOR,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,COLOR_ORANGE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
else if(dice == dice1)
{
SCM(playerid, COLOR_ORANGE, "Игра закончилась в ничью!");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_ORANGE, "Игра закончилась в ничью!");
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,COLOR_LIGHTBLUE,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,COLOR_LIGHTBLUE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
}
else if(GetPVarInt(playerid,"Invite") == 1)
{
new acter = GetPVarInt(playerid,"Player");
GetFrak(acter,PlayerInfo[acter][tMember],1147);
SetPVarInt(acter,"invite",playerid);
DeletePVar(playerid,"Invite");
DeletePVar(playerid,"Player");
}
else if(PlayerInfo[playerid][pShowPassact] == playerid)
{
new acter = PlayerInfo[playerid][pShowPasspl],stringer[90];
ShowPass(acter,playerid);
format(stringer,sizeof(stringer),"достал паспорт и показал его %s",NamePlayer[playerid]);
MeAction(acter,stringer);
PlayerInfo[playerid][pShowPassact] = -1;
}
else if(pTemp[playerid][pShowSkillact] == playerid)
{
new acter = pTemp[playerid][pShowSkillpl];
scat[0] = 0; // Очищаем
new points[6];
points[0] = 100 - PlayerInfo[acter][pSDPistol];
points[1] = 100 - PlayerInfo[acter][pDesertEagle];
points[2] = 100 - PlayerInfo[acter][pShotGun];
points[3] = 100 - PlayerInfo[acter][pMP5];
points[4] = 100 - PlayerInfo[acter][pAK47];
points[5] = 100 - PlayerInfo[acter][pM4];
format(scat,sizeof(scat),"{FFFFFF}SDPistol:\t[%s]%d\nDeagle:\t[%s]%d \nShotGun:\t[%s]%d\nMP5\t\t[%s]%d \nAK47:\t\t[%s]%d\nM4A1:\t\t[%s]%d",
ToDevelopSkills(PlayerInfo[acter][pSDPistol],points[0]),PlayerInfo[acter][pSDPistol],
ToDevelopSkills(PlayerInfo[acter][pDesertEagle],points[1]),PlayerInfo[acter][pDesertEagle],
ToDevelopSkills(PlayerInfo[acter][pShotGun],points[2]),PlayerInfo[acter][pShotGun],
ToDevelopSkills(PlayerInfo[acter][pMP5],points[3]),PlayerInfo[acter][pMP5],
ToDevelopSkills(PlayerInfo[acter][pAK47],points[4]),PlayerInfo[acter][pAK47],
ToDevelopSkills(PlayerInfo[acter][pM4],points[5]),PlayerInfo[acter][pM4]);
ShowPlayerDialog(playerid,231,DIALOG_STYLE_MSGBOX,"{FFFF00}Навыки владения оружием",scat,"Закрыть","");
new mese[64];
format(mese,sizeof(mese),"показал выписку из тира %s'y",NamePlayer[playerid]);
MeAction(acter,mese);
pTemp[playerid][pShowSkillact] = -1;
}
}

Ramos :3
12.11.2014, 15:39
Не помогло :sad:


if(newkeys & KEY_NO)
{
if(GetPVarInt(playerid,"pSettleHouseOffee") == playerid)
{
new offer = GetPVarInt(playerid,"pSettleHouseOffer");
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SCM(playerid,COLOR_BLUE,"Вы отказались от жилья");
SCM(offer,COLOR_BLUE,"Клиент отказался от заселения в Ваш дом");
}
else if(GetPVarInt(playerid, "KostiName") < 999)
{
SetPVarInt(playerid, "KostiName",999);
SetPVarInt(playerid, "KostiMoney", 0);
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(GetPVarInt(playerid, "KostiName"),-1,"- Игрок отказался от предложения");
}
else if(GetPVarInt(playerid,"Invite") == 1)
{
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(GetPVarInt(playerid,"Player"),-1,"- Игрок отказался от предложения");
DeletePVar(playerid,"Invite");
DeletePVar(playerid,"Player");
}
else if(pTemp[playerid][pShowSkillact] == playerid)
{
SCM(playerid,-1,"Вы отказались от предложения");
SCM(pTemp[playerid][pShowSkillpl],-1,"Игрок отказался от предложения");
pTemp[playerid][pShowSkillact] = -1;
}
else if(PlayerInfo[playerid][pShowPassact] == playerid)
{
SCM(playerid, -1,"- Вы отказались от предложения");
SCM(PlayerInfo[playerid][pShowPasspl],-1,"- Игрок отказался от предложения");
PlayerInfo[playerid][pShowPassact] = -1;
}
}
if(newkeys & KEY_YES)
{
if(GetPVarInt(playerid,"pSettleHouseOffee") == playerid)
{
new houseid = GetPVarInt(playerid, "pSettleHouseID");
new offerid = GetPVarInt(playerid, "pSettleHouseOffer");
if(GetPVarInt(offerid, "pSettleHouseOffer") == INVALID_PLAYER_ID || !IsPlayerConnected(offerid))
{
SCM(playerid,CGRAY,"Тот, кто предлагал поселиться у него дома вышел из игры");
SetPVarInt(offerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseID",0);
return true;
}
SCMF(playerid,0x269BD8FF,"Вы стали жильцом в доме {"#cWHITE"}%s",NamePlayer[offerid]);
SCMF(offerid,0x269BD8FF,"Вы приняли {"#cWHITE"}%s {"#cINFO"}жильцом в свой дом",NamePlayer[playerid]);
PlayerInfo[playerid][pTempKey] = houseid;
SetPVarInt(offerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffer",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseOffee",INVALID_PLAYER_ID);
SetPVarInt(playerid,"pSettleHouseID",0);
}
else if(GetPVarInt(playerid, "KostiName") < 999)
{
if(!PlayerToPoint(30.0,playerid,1130.7448,-1.4491,1000.6797)) return SCM(playerid, COLOR_WHITE, "Вы должны находиться в казино!");
new dice = random(12)+1;
new dice1 = random(12)+1;
new stringer[190];
format(stringer, sizeof(stringer), "%s и %s бросили кости. Результат: {CC9900}%i:%i",NamePlayer[GetPVarInt(playerid, "KostiName")],NamePlayer[playerid],dice,dice1);
ProxDetector(5.0, playerid, stringer, 0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF);
if(dice > dice1)
{
PlayerInfo[GetPVarInt(playerid, "KostiName")][pCash] += GetPVarInt(playerid, "KostiMoney");
PlayerInfo[playerid][pCash] -= GetPVarInt(playerid, "KostiMoney");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_GREEN, "Поздравляем, Вы выиграли!");
SCM(playerid, COLOR_ORANGE, "К сожалению, Вы проиграли!");
format(stringer, sizeof(stringer), "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), stringer, 3000, 1);
format(stringer, sizeof(stringer), "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, stringer, 3000, 1);
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,COLOR_ORANGE,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,TEAM_GROVE_COLOR,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
else if(dice < dice1)
{
PlayerInfo[GetPVarInt(playerid, "KostiName")][pCash] -= GetPVarInt(playerid, "KostiMoney");
PlayerInfo[playerid][pCash] += GetPVarInt(playerid, "KostiMoney");
SCM(playerid, COLOR_GREEN, "Поздравляем, Вы выиграли!");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_ORANGE, "К сожалению, Вы проиграли!");
format(stringer, sizeof(stringer), "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, stringer, 3000, 1);
format(stringer, sizeof(stringer), "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), stringer, 3000, 1);
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,TEAM_GROVE_COLOR,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,COLOR_ORANGE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
else if(dice == dice1)
{
SCM(playerid, COLOR_ORANGE, "Игра закончилась в ничью!");
SCM(GetPVarInt(playerid, "KostiName"), COLOR_ORANGE, "Игра закончилась в ничью!");
format(stringer,sizeof(stringer), "Выпало: %i",dice1);
SetPlayerChatBubble(playerid,stringer,COLOR_LIGHTBLUE,30.0,10000);
format(stringer,sizeof(stringer), "Выпало: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),stringer,COLOR_LIGHTBLUE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
SetPVarInt(playerid, "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[GetPVarInt(playerid, "KostiName")] = 0;
SetPVarInt(playerid, "KostiMoney",0);
SetPVarInt(playerid, "KostiName",999);
}
}
else if(GetPVarInt(playerid,"Invite") == 1)
{
new acter = GetPVarInt(playerid,"Player");
GetFrak(acter,PlayerInfo[acter][tMember],1147);
SetPVarInt(acter,"invite",playerid);
DeletePVar(playerid,"Invite");
DeletePVar(playerid,"Player");
}
else if(PlayerInfo[playerid][pShowPassact] == playerid)
{
new acter = PlayerInfo[playerid][pShowPasspl],stringer[90];
ShowPass(acter,playerid);
format(stringer,sizeof(stringer),"достал паспорт и показал его %s",NamePlayer[playerid]);
MeAction(acter,stringer);
PlayerInfo[playerid][pShowPassact] = -1;
}
else if(pTemp[playerid][pShowSkillact] == playerid)
{
new acter = pTemp[playerid][pShowSkillpl];
scat[0] = 0; // Очищаем
new points[6];
points[0] = 100 - PlayerInfo[acter][pSDPistol];
points[1] = 100 - PlayerInfo[acter][pDesertEagle];
points[2] = 100 - PlayerInfo[acter][pShotGun];
points[3] = 100 - PlayerInfo[acter][pMP5];
points[4] = 100 - PlayerInfo[acter][pAK47];
points[5] = 100 - PlayerInfo[acter][pM4];
format(scat,sizeof(scat),"{FFFFFF}SDPistol:\t[%s]%d\nDeagle:\t[%s]%d \nShotGun:\t[%s]%d\nMP5\t\t[%s]%d \nAK47:\t\t[%s]%d\nM4A1:\t\t[%s]%d",
ToDevelopSkills(PlayerInfo[acter][pSDPistol],points[0]),PlayerInfo[acter][pSDPistol],
ToDevelopSkills(PlayerInfo[acter][pDesertEagle],points[1]),PlayerInfo[acter][pDesertEagle],
ToDevelopSkills(PlayerInfo[acter][pShotGun],points[2]),PlayerInfo[acter][pShotGun],
ToDevelopSkills(PlayerInfo[acter][pMP5],points[3]),PlayerInfo[acter][pMP5],
ToDevelopSkills(PlayerInfo[acter][pAK47],points[4]),PlayerInfo[acter][pAK47],
ToDevelopSkills(PlayerInfo[acter][pM4],points[5]),PlayerInfo[acter][pM4]);
ShowPlayerDialog(playerid,231,DIALOG_STYLE_MSGBOX,"{FFFF00}Навыки владения оружием",scat,"Закрыть","");
new mese[64];
format(mese,sizeof(mese),"показал выписку из тира %s'y",NamePlayer[playerid]);
MeAction(acter,mese);
pTemp[playerid][pShowSkillact] = -1;
}
}