27.01.2014, 23:53
Can someone say what's wrong in this cmd
Because when i add it in server, my mapping disapears
PHP код:
CMD:cells(playerid, params[])
{
new string[128];
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
{
GetPlayerPos( playerid, Positions[0][0], Positions[0][1], Positions[0][2]);
GetDynamicObjectPos(cell0, Positions[0][0], Positions[0][1], Positions[0][2]);
GetDynamicObjectPos(cell1, Positions[1][0], Positions[1][1], Positions[1][2]);
GetDynamicObjectPos(cell2, Positions[2][0], Positions[2][1], Positions[2][2]);
GetDynamicObjectPos(cell3, Positions[3][0], Positions[3][1], Positions[4][2]);
GetDynamicObjectPos(cell4, Positions[4][0], Positions[4][1], Positions[4][2]);
GetDynamicObjectPos(cell5, Positions[5][0], Positions[5][1], Positions[5][2]);
GetDynamicObjectPos(cell6, Positions[6][0], Positions[6][1], Positions[6][2]);
GetDynamicObjectPos(cell7, Positions[7][0], Positions[7][1], Positions[7][2]);
GetDynamicObjectPos(cell8, Positions[8][0], Positions[8][1], Positions[8][2]);
GetDynamicObjectPos(cell9, Positions[9][0], Positions[9][1], Positions[9][2]);
GetDynamicObjectPos(cell10, Positions[0][0], Positions[10][1], Positions[10][2]);
GetDynamicObjectPos(cell11, Positions[1][0], Positions[11][1], Positions[11][2]);
GetDynamicObjectPos(cell12, Positions[2][0], Positions[12][1], Positions[12][2]);
GetDynamicObjectPos(cell13, Positions[3][0], Positions[13][1], Positions[13][2]);
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1827.80004883,-1729.19995117,5202.79980469)) {
if(Cell0Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell0,1827.80004883+1.25,-1729.19995117,5202.79980469,0.50);
Cell0Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell0,1827.80004883,-1729.19995117,5202.79980469,0.50);
Cell0Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1831.00000000,-1729.19995117,5202.79980469)) {
if(Cell1Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell1,1831.00000000+1.25,-1729.19995117,5202.79980469,0.50);
Cell1Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell1,1831.00000000,-1729.19995117,5202.79980469,0.50);
Cell1Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1834.19995117,-1729.19995117,5202.79980469)) {
if(Cell2Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell2,1834.19995117+1.25,-1729.19995117,5202.79980469,0.50);
Cell2Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell2,1834.19995117,-1729.19995117,5202.79980469,0.50);
Cell2Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1837.40002441,-1729.19995117,5202.79980469)) {
if(Cell3Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell3,1837.40002441+1.25,-1729.19995117,5202.79980469,0.50);
Cell3Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell3,1837.40002441,-1729.19995117,5202.79980469,0.50);
Cell3Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1840.59997559,-1729.19995117,5202.79980469)) {
if(Cell4Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell4,1840.59997559+1.25,-1729.19995117,5202.79980469,0.50);
Cell4Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell4,1840.59997559,-1729.19995117,5202.79980469,0.50);
Cell4Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1827.80004883,-1729.19995117,5206.39990234)) {
if(Cell5Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell5,1827.80004883+1.25,-1729.19995117,5206.39990234,0.50);
Cell5Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell5,1827.80004883,-1729.19995117,5206.39990234,0.50);
Cell5Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1831.00000000,-1729.19995117,5206.39990234)) {
if(Cell6Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell6,1831.00000000+1.25,-1729.19995117,5206.39990234,0.50);
Cell6Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell6,1831.00000000,-1729.19995117,5206.39990234,0.50);
Cell6Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1834.19995117,-1729.19995117,5206.39990234)) {
if(Cell7Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell7,1834.19995117+1.25,-1729.19995117,5206.39990234,0.50);
Cell7Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell7,1834.19995117,-1729.19995117,5206.39990234,0.50);
Cell7Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1837.40002441,-1729.19995117,5206.39990234)) {
if(Cell8Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell8,1837.40002441+1.25,-1729.19995117,5206.39990234,0.50);
Cell8Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell8,1837.40002441,-1729.19995117,5206.39990234,0.50);
Cell8Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1840.59997559,-1729.19995117,5206.39990234)) {
if(Cell9Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell9,1840.59997559+1.25,-1729.19995117,5206.39990234,0.50);
Cell9Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell9,1840.59997559,-1729.19995117,5206.39990234,0.50);
Cell9Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1843.80004883,-1729.19995117,5206.39990234)) {
if(Cell10Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell10,1843.80004883+1.25,-1729.19995117,5206.39990234,0.50);
Cell10Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell10,1843.80004883,-1729.19995117,5206.39990234,0.50);
Cell10Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1843.80004883,-1729.19995117,5202.79980469)) {
if(Cell11Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell11,1843.80004883+1.25,-1729.19995117,5202.79980469,0.50);
Cell11Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell11,1843.80004883,-1729.19995117,5202.79980469,0.50);
Cell11Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1843.80004883,-1729.19995117,5209.89990234)) {
if(Cell12Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell12,1843.80004883+1.25,-1729.19995117,5209.89990234,0.50);
Cell12Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell12,1843.80004883,-1729.19995117,5209.89990234,0.50);
Cell12Status = 0;
}
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1840.59997559,-1729.19995117,5209.89990234)) {
if(Cell13Status == 0) {
format( string, sizeof( string ), "* %s uses their remote to open the cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell13,1840.59997559+1.25,-1729.19995117,5209.89990234,0.50);
Cell13Status = 1;
}
else {
format( string, sizeof( string ), "* %s uses their remote to close cell gates.", GetPlayerNameEx(playerid));
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
MoveDynamicObject(cell13,1840.59997559,-1729.19995117,5209.89990234,0.50);
Cell13Status = 0;
}
}
}
return 1;
}