Frag
Умник
Автор мануала : Frag
Ко всем new добавляем :
В паблик
Добавить это
В паблик
Добовляем это
=============Команда================
В паблик:
Эту команду :
В паблик :
Добавить это :
Вот и все
Ко всем new добавляем :
PHP:
new kazinotp;
new kazinotp1;
new kazino;
new gDice[MAX_PLAYERS];
PHP:
public OnPlayerPickUpPickup(playerid, pickupid)
PHP:
if(pickupid == kazinotp)//
{
SetPlayerPos(playerid,1132.8400,-12.8721,1000.6797);//
SetPlayerInterior(playerid,12);//
PlayerInfo[playerid][pInt] = 12;
}
if(pickupid == kazinotp1)//
{
SetPlayerPos(playerid,1658.0184,2253.4177,11.0625);//
SetPlayerInterior(playerid,0);//
gDice[playerid] = 0;
PlayerInfo[playerid][pInt] = 0;
}
if(pickupid == kazino)
{
gDice[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "Вы взяли кости");
SendClientMessage(playerid, COLOR_LIGHTRED, "Чтобы играть введите /dice");
}
PHP:
public OnGameModeInit()
Добовляем это
PHP:
kazinotp = CreatePickup(1318,20,1658.4747,2250.5500,11.0701);
kazinotp1 = CreatePickup(1318,20,1133.1100,-15.3237,1000.6797);
kazino = CreatePickup(1239,20,1138.9288,-6.7742,1000.6719);
В паблик:
PHP:
public OnPlayerCommandText(playerid, cmdtext[])
PHP:
if(strcmp(cmd, "/dice", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new dice = random(12)+1;
if (gDice[playerid] == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Бросил игральные кости на стол, выпало %d очков из 12", sendername,dice);
ProxDetector(5.0, playerid, string, COLOR_INDIGO,COLOR_INDIGO,COLOR_INDIGO,COLOR_INDIGO,COLOR_INDIGO);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "У вас нет костей!");
return 1;
}
}
return 1;
}
PHP:
public OnPlayerConnect(playerid)
PHP:
gDice[playerid] = 0;
Последнее редактирование:
