Пользователь
- Регистрация
- 30 Мар 2022
- Сообщения
- 12
- Автор темы
- #1
new shapka[MAX_PLAYERS];
if(strcmp(cmd, "/shapka", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(shapka[playerid] == 0)
{
SetPlayerAttachedObject(playerid,2, 19064, 2, 0.13, 0.0, 0.0, 0.0, 90.0, 90.0);
shapka[playerid] = 1;
GiveMoney(playerid, -0);// Сколько стоит
SendClientMessage(playerid, COLOR_YELLOW, "Вы надели новогоднюю шапку!");
}
else
{
RemovePlayerAttachedObject(playerid, 2);
DestroyPlayerObject(playerid, 19064);
shapka[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "Вы сняли шапку!");
}
}
return 1;
}
{
if(IsPlayerConnected(playerid))
{
if(shapka[playerid] == 0)
{
SetPlayerAttachedObject(playerid,2, 19064, 2, 0.13, 0.0, 0.0, 0.0, 90.0, 90.0);
shapka[playerid] = 1;
GiveMoney(playerid, -0);// Сколько стоит
SendClientMessage(playerid, COLOR_YELLOW, "Вы надели новогоднюю шапку!");
}
else
{
RemovePlayerAttachedObject(playerid, 2);
DestroyPlayerObject(playerid, 19064);
shapka[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "Вы сняли шапку!");
}
}
return 1;
}
CMD:shapka(playerid)