Kronos | Дата: Четверг, 03.07.2014, 01:26 | Сообщение # 1 |
|
Местный мазафака
Сообщений: 117
| Команда для МП чтоб тп кто хочет Код if(strcmp(cmd, "/стартуем", true) == 0) { new admin[256]; GetPlayerName(playerid,admin,sizeof(admin)); if (PlayerInfo[playerid][pAdmin] >= 11) { if (!tpadmin[playerid]) { for(new i = 0; i < MAX_PLAYERS; i++) { tpadmin[i] = 1; } PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid); GetPlayerPos(playerid,PX,PY,PZ); GetPlayerFacingAngle(playerid,PANGLE); format(string,sizeof(string),"{FF0000}>> %s(%d): Телепорт к админу, введите /gotp <<",admin,playerid); SendClientMessageToAll( COLOR_WHITE,string); } else if (tpadmin[playerid]) { for(new i = 0; i < MAX_PLAYERS; i++) { tpadmin[i] = 0; } format(string,sizeof(string),"{FF0000}>> %s(%d): Телепорт закрыт <<",admin,playerid); SendClientMessageToAll( COLOR_YELLOW,string); } } } Код if(strcmp(cmd, "/gotp", true) == 0) { if(tpadmin[playerid] == 0) { SendClientMessage(playerid,COLOR_GREY,"Телепорт закрыт!"); return true; } PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid); SetPlayerPos(playerid,PX,PY,PZ+2); SetPlayerFacingAngle(playerid,PANGLE); SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]); SendClientMessage(playerid, COLOR_WHITE, "Вы телепортировались); }
|
|
| | |
| |