Дима123
Новичок
Ко все командам:
Сразу говорю, вырезано из старого мода, я только немного подправил.
+' сов не прошу вылажил, может кому небудь понадобится.
PHP:
if(strcmp(cmd, "/house", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Используйте: /house [housenumber]");
return 1;
}
new housenum = strval(tmp);
SetPlayerInterior(playerid,HouseInfo[housenum][hInt]);
SetPlayerPos(playerid,HouseInfo[housenum][hExitx],HouseInfo[housenum][hExity],HouseInfo[housenum][hExitz]);
GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[housenum][hInt];
PlayerInfo[playerid][pLocal] = housenum;
}
}
return 1;
}
if(strcmp(cmd, "/houseo", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1) //Здесь уровень адм( Тоесть с этого уровня можно исппользовать кому)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Используйте: /houseo [housenumber]");
return 1;
}
new housenum = strval(tmp);
SetPlayerPos(playerid,HouseInfo[housenum][hEntrancex],HouseInfo[housenum][hEntrancey],HouseInfo[housenum][hEntrancez]);
GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
}
}
return 1;
+' сов не прошу вылажил, может кому небудь понадобится.
Последнее редактирование:
