Dixon
Ученик
в public OnPlayerCommandText
/home
/findhouse
/home
PHP:
if(strcmp(cmd, "/home", true) == 0)
{
if(PlayerInfo[playerid][pPhousekey] != 255)
{
SetPlayerCheckpoint(playerid,HouseInfo[PlayerInfo[playerid][pPhousekey]][hEntrancex], HouseInfo[PlayerInfo[playerid][pPhousekey]][hEntrancey], HouseInfo[PlayerInfo[playerid][pPhousekey]][hEntrancez], 4.0);
SendClientMessage(playerid, COLOR_WHITE, "Ваш дом обозначен на карте красной меткой");
gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
}
else
{
return 1;
}
}
PHP:
if(strcmp(cmd, "/findhouse", true) == 0)
{
if(PlayerInfo[playerid][pJob] == 7)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "::: Введите: /findhouse [дом]");
new house = strval(tmp);
SetPlayerCheckpoint(playerid,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez], 4.0);
SendClientMessage(playerid, COLOR_WHITE, "Метка на карте установлена");
CP[playerid] = 0;
}
return 1;
}
