F[a]ust
Умник
Вот прописка в ЛС.Получить его можно у Полиции.Он создан для РПшности...
Мод GF
И так начнем..
в
добавляем:
далее в
добавляем:
Затем в
добавляем:
далее в
(у вас он может по другому называться)
добавляем:
В
добавляем:
Дальше создаем команду выдачи Прописки(для полиции к примеру):
И заменяем команду /showdoc(у кого нету добавьте) на эту:
Готово
Автор:хз
Мод GF
И так начнем..
в
PHP:
enum pInfo
PHP:
pPropis,
PHP:
public OnPlayerConnect(playerid)
PHP:
PlayerInfo[playerid][pPropis] = 0;
PHP:
public OnPlayerRegister(playerid, password[])
PHP:
format(var, 32, "Propis=%d\n",PlayerInfo[playerid][pPropis]);fwrite(hFile, var);
PHP:
public GF_OnPlayerUpdate(playerid)
добавляем:
PHP:
format(var, 32, "Propis=%d\n",PlayerInfo[playerid][pPropis]);fwrite(hFile, var);
PHP:
public OnPlayerLogin(playerid,password[])
PHP:
if( strcmp( key , "Propis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPropis] = strval( val ); }
PHP:
if(strcmp(cmd, "/givepropis", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Используйте: /givepropis [ид]");
if(PlayerInfo[giveplayerid][pPropis] != 1) return SendClientMessage(playerid, COLOR_RED, " У игрока уже есть прописка !");
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), " Вы выдали %s прописку в Лос Сантое.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Полицейский выдал вам прописку в Лос Сантосе.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pPropis] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Этого игрока нету на сервере !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Вы не полицейский !");
return 1;
}
}
return 1;
}
PHP:
if(strcmp(cmd,"/showdoc",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "*???????: /showdoc [ID/????? ????]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(2.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "*?? ?? ?????? ???????? ???????? ????, ??? ????? ??????????? '/licenses'"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new text1[20];
new text2[20];
new text3[20];
new text4[20];
new text5[20];
new text6[20];
if(PlayerInfo[playerid][pCarLic] == 1) { text1 = "????"; } else { text1 = "???????????"; }
if(PlayerInfo[playerid][pFlyLic]) { text4 = "????"; } else { text4 = "???????????"; }
if(PlayerInfo[playerid][pBoatLic]) { text2 = "????"; } else { text2 = "???????????"; }
if(PlayerInfo[playerid][pFishLic]) { text3 = "????"; } else { text3 = "???????????"; }
if(PlayerInfo[playerid][pGunLic]) { text5 = "????"; } else { text5 = "???????????"; }
if(PlayerInfo[playerid][pPropis]) { text6 = "????"; } else { text6 = "???????????"; }
format(string, sizeof(string), "|_________ ???????? %s__________|", sendername);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "**???????? ?? ????????: %s", text1);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "**???????? ?? ??????: %s", text4);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "**???????? ?? ?????: %s", text2);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "**???????? ?? ???????: %s", text3);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "**???????? ?? ??????: %s", text5);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "**???????? ? ??? ???????: %s", text6);
SendClientMessage(giveplayerid, COLOR_GREY, string);
format(string, sizeof(string), "*%s ??????? ??? ???? ????????", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "*?? ???????? %s ???? ???????? ", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
new ownedcar = PlayerInfo[playerid][pCar];
new namecar = GetVehicleModel(ownedcar)-400;
if(ownedcar >= 1 && ownedcar <= 130)
{
format(string, sizeof(string), "*????? ????: [%d], ??? ????: [%s]", ownedcar, VehName[namecar]);
SendClientMessage(giveplayerid, COLOR_GREY,string);
}
format(string, sizeof(string), "*%s ??????? %s ??????? ?????????.", sendername, giveplayer);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "*????? ?????? ?? ???");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "*??? ?????? ??????");
return 1;
}
}
return 1;
}
Готово
Автор:хз
